| Index: webrtc/base/timeutils.h
|
| diff --git a/webrtc/base/timeutils.h b/webrtc/base/timeutils.h
|
| index 3ade43094708c92e02e075522a4da151b7712059..f0269b572fced331fc304d0773958fd838d68efc 100644
|
| --- a/webrtc/base/timeutils.h
|
| +++ b/webrtc/base/timeutils.h
|
| @@ -34,8 +34,19 @@ static const int64_t kJan1970AsNtpMillisecs = INT64_C(2208988800000);
|
|
|
| typedef uint32_t TimeStamp;
|
|
|
| +// Returns the current time in milliseconds in 32 bits.
|
| +uint32_t Time32();
|
| +
|
| +// Returns the current time in milliseconds in 64 bits.
|
| +int64_t Time64();
|
| +
|
| // Returns the current time in milliseconds.
|
| -uint32_t Time();
|
| +// TODO(honghaiz): Returns Time64 once majority of the webrtc code migrates to
|
| +// 64-bit timestamp.
|
| +inline uint32_t Time() {
|
| + return Time32();
|
| +}
|
| +
|
| // Returns the current time in microseconds.
|
| uint64_t TimeMicros();
|
| // Returns the current time in nanoseconds.
|
| @@ -68,6 +79,10 @@ inline uint32_t TimeMin(uint32_t ts1, uint32_t ts2) {
|
| // timestamps. The value is negative if 'later' occurs before 'earlier'.
|
| int32_t TimeDiff(uint32_t later, uint32_t earlier);
|
|
|
| +// Number of milliseconds that would elapse between 'earlier' and 'later'
|
| +// timestamps. The value is negative if 'later' occurs before 'earlier'.
|
| +int64_t TimeDiff64(int64_t later, int64_t earlier);
|
| +
|
| // The number of milliseconds that have elapsed since 'earlier'.
|
| inline int32_t TimeSince(uint32_t earlier) {
|
| return TimeDiff(Time(), earlier);
|
|
|