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}
This commit is contained in:
honghaiz
2016-03-16 08:55:44 -07:00
committed by Commit bot
parent c4a74e95b5
commit 34b11eb66e
25 changed files with 164 additions and 130 deletions

View File

@ -144,6 +144,14 @@ TEST(TimeTest, DISABLED_CurrentTmTime) {
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() {}