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

Unified Diff: webrtc/base/timeutils.h

Issue 2514553003: Change rtc::TimeNanos and rtc::TimeMicros return value from uint64_t to int64_t. (Closed)
Patch Set: Rebased, on top of fixed BoringSSL TimeCallback.' Created 4 years, 1 month 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/socket_unittest.cc ('k') | webrtc/base/timeutils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/timeutils.h
diff --git a/webrtc/base/timeutils.h b/webrtc/base/timeutils.h
index cc6deb47a9a4a4e04141a7e98a6a5f9da3324b19..f41bbb5ad0436ffbcd99e4da1b22c76f5ae35e5e 100644
--- a/webrtc/base/timeutils.h
+++ b/webrtc/base/timeutils.h
@@ -34,7 +34,7 @@ static const int64_t kNumNanosecsPerMicrosec =
class ClockInterface {
public:
virtual ~ClockInterface() {}
- virtual uint64_t TimeNanos() const = 0;
+ virtual int64_t TimeNanos() const = 0;
};
// Sets the global source of time. This is useful mainly for unit tests.
@@ -55,7 +55,7 @@ ClockInterface* SetClockForTesting(ClockInterface* clock);
// Returns the actual system time, even if a clock is set for testing.
// Useful for timeouts while using a test clock, or for logging.
-uint64_t SystemTimeNanos();
+int64_t SystemTimeNanos();
int64_t SystemTimeMillis();
// Returns the current time in milliseconds in 32 bits.
@@ -69,10 +69,11 @@ inline int64_t Time() {
}
// Returns the current time in microseconds.
-uint64_t TimeMicros();
+int64_t TimeMicros();
// Returns the current time in nanoseconds.
-uint64_t TimeNanos();
+int64_t TimeNanos();
+
// Returns a future timestamp, 'elapsed' milliseconds from now.
int64_t TimeAfter(int64_t elapsed);
@@ -88,7 +89,7 @@ inline int64_t TimeSince(int64_t earlier) {
}
// The number of milliseconds that will elapse between now and 'later'.
-inline int64_t TimeUntil(uint64_t later) {
+inline int64_t TimeUntil(int64_t later) {
return later - TimeMillis();
}
« no previous file with comments | « webrtc/base/socket_unittest.cc ('k') | webrtc/base/timeutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698