Chromium Code Reviews| Index: webrtc/base/timeutils.h |
| diff --git a/webrtc/base/timeutils.h b/webrtc/base/timeutils.h |
| index 3ade43094708c92e02e075522a4da151b7712059..c134179d534a46ec2ed2bc121596c4300ab075f2 100644 |
| --- a/webrtc/base/timeutils.h |
| +++ b/webrtc/base/timeutils.h |
| @@ -36,6 +36,10 @@ typedef uint32_t TimeStamp; |
| // Returns the current time in milliseconds. |
| uint32_t Time(); |
|
pthatcher1
2016/03/15 04:10:50
Can you make a Time32() that chooses 32-bit time,
honghaiz3
2016/03/15 17:35:33
Done. The last item will be done in the next CL wh
|
| + |
| +// Returns the current time in milliseconds. |
| +int64_t Time64(); |
| + |
| // Returns the current time in microseconds. |
| uint64_t TimeMicros(); |
| // Returns the current time in nanoseconds. |
| @@ -68,6 +72,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); |
|
pthatcher1
2016/03/15 04:10:50
Same here with the names: make TimeDiff64 the defa
honghaiz3
2016/03/15 17:35:33
Will do this in the next CL because many of the 32
|
| + |
| // The number of milliseconds that have elapsed since 'earlier'. |
| inline int32_t TimeSince(uint32_t earlier) { |
| return TimeDiff(Time(), earlier); |