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

Unified Diff: webrtc/base/timeutils.cc

Issue 1793553002: Using 64-bit timestamp in webrtc/p2p (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 b7803aea10bbfef842c88f4f7f371baa770fa257..0c40c5286ea43d0b209c0c54179ed52de9c5871e 100644
--- a/webrtc/base/timeutils.cc
+++ b/webrtc/base/timeutils.cc
@@ -80,10 +80,14 @@ uint64_t TimeNanos() {
return ticks;
}
-uint32_t Time() {
+uint32_t Time32() {
return static_cast<uint32_t>(TimeNanos() / kNumNanosecsPerMillisec);
}
+int64_t Time64() {
+ return static_cast<int64_t>(TimeNanos() / kNumNanosecsPerMillisec);
+}
+
uint64_t TimeMicros() {
return static_cast<uint64_t>(TimeNanos() / kNumNanosecsPerMicrosec);
}
@@ -192,6 +196,10 @@ int32_t TimeDiff(uint32_t later, uint32_t earlier) {
#endif
}
+int64_t TimeDiff64(int64_t later, int64_t earlier) {
+ return later - earlier;
+}
+
TimestampWrapAroundHandler::TimestampWrapAroundHandler()
: last_ts_(0), num_wrap_(-1) {}
« 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