Using 64-bit timestamp to replace the 32-bit one in webrtc/p2p.
Also changed from unsigned to signed integer per the style guide.
By the way, I kept all delta-times to be 32-bit int.
The only things left in the p2p dir are
1. proberprober/main.cc where Time() is used as the input for a random number.
2. pseudotcp.cc: where 32-bit time info is sent over the wire.
BUG=webrtc:5636
Review URL: https://codereview.webrtc.org/1793553002
Cr-Commit-Position: refs/heads/master@{#12019}
diff --git a/webrtc/base/timeutils_unittest.cc b/webrtc/base/timeutils_unittest.cc
index 7e342d0..636c408 100644
--- a/webrtc/base/timeutils_unittest.cc
+++ b/webrtc/base/timeutils_unittest.cc
@@ -144,6 +144,14 @@
EXPECT_TRUE(0 <= microseconds && microseconds < 1000000);
}
+TEST(TimeTest, TestTimeDiff64) {
+ int64_t ts_diff = 100;
+ int64_t ts_earlier = rtc::Time64();
+ int64_t ts_later = ts_earlier + ts_diff;
+ EXPECT_EQ(ts_diff, rtc::TimeDiff(ts_later, ts_earlier));
+ EXPECT_EQ(-ts_diff, rtc::TimeDiff(ts_earlier, ts_later));
+}
+
class TimestampWrapAroundHandlerTest : public testing::Test {
public:
TimestampWrapAroundHandlerTest() {}