Change rtc::TimeNanos and rtc::TimeMicros return value from uint64_t to int64_t.
Also updated types close to call sites.
BUG=webrtc:6733
Review-Url: https://codereview.webrtc.org/2514553003
Cr-Commit-Position: refs/heads/master@{#15255}
diff --git a/webrtc/base/timeutils.h b/webrtc/base/timeutils.h
index cc6deb4..f41bbb5 100644
--- a/webrtc/base/timeutils.h
+++ b/webrtc/base/timeutils.h
@@ -34,7 +34,7 @@
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 @@
// 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 @@
}
// 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 @@
}
// 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();
}