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}
This commit is contained in:
nisse
2016-11-28 01:54:54 -08:00
committed by Commit bot
parent 71b9b58a3a
commit deb95f32f4
13 changed files with 46 additions and 45 deletions

View File

@ -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();
}