Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: webrtc/base/timeutils.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/timeutils.h ('k') | webrtc/base/timeutils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/timeutils.cc
diff --git a/webrtc/base/timeutils.cc b/webrtc/base/timeutils.cc
index b222470967fde129e0e9c2dcbc3d5d28aca4726d..a9fe49d6075a2341a387247ccb8e941677ee3544 100644
--- a/webrtc/base/timeutils.cc
+++ b/webrtc/base/timeutils.cc
@@ -30,8 +30,6 @@
namespace rtc {
-const uint32_t HALF = 0x80000000;
-
uint64_t TimeNanos() {
int64_t ticks = 0;
#if defined(WEBRTC_MAC)
@@ -90,27 +88,16 @@ uint64_t TimeMicros() {
return static_cast<uint64_t>(TimeNanos() / kNumNanosecsPerMicrosec);
}
-uint32_t TimeAfter(int32_t elapsed) {
+int64_t TimeAfter(int64_t elapsed) {
RTC_DCHECK_GE(elapsed, 0);
- RTC_DCHECK_LT(static_cast<uint32_t>(elapsed), HALF);
- return Time() + elapsed;
-}
-
-bool TimeIsLaterOrEqual(uint32_t earlier, uint32_t later) {
- int32_t diff = later - earlier;
- return (diff >= 0 && static_cast<uint32_t>(diff) < HALF);
-}
-
-bool TimeIsLater(uint32_t earlier, uint32_t later) {
- int32_t diff = later - earlier;
- return (diff > 0 && static_cast<uint32_t>(diff) < HALF);
+ return TimeMillis() + elapsed;
}
-int32_t TimeDiff(uint32_t later, uint32_t earlier) {
+int32_t TimeDiff32(uint32_t later, uint32_t earlier) {
return later - earlier;
}
-int64_t TimeDiff64(int64_t later, int64_t earlier) {
+int64_t TimeDiff(int64_t later, int64_t earlier) {
return later - earlier;
}
« no previous file with comments | « webrtc/base/timeutils.h ('k') | webrtc/base/timeutils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698