Chromium Code Reviews| Index: webrtc/base/timeutils.h |
| diff --git a/webrtc/base/timeutils.h b/webrtc/base/timeutils.h |
| index f0269b572fced331fc304d0773958fd838d68efc..2d91bc8f601555425be9b5611e95474c610d52f1 100644 |
| --- a/webrtc/base/timeutils.h |
| +++ b/webrtc/base/timeutils.h |
| @@ -29,9 +29,6 @@ static const int64_t kNumNanosecsPerMillisec = |
| static const int64_t kNumNanosecsPerMicrosec = |
| kNumNanosecsPerSec / kNumMicrosecsPerSec; |
| -// January 1970, in NTP milliseconds. |
| -static const int64_t kJan1970AsNtpMillisecs = INT64_C(2208988800000); |
| - |
| typedef uint32_t TimeStamp; |
| // Returns the current time in milliseconds in 32 bits. |
| @@ -52,16 +49,9 @@ uint64_t TimeMicros(); |
| // Returns the current time in nanoseconds. |
| uint64_t TimeNanos(); |
| -// Stores current time in *tm and microseconds in *microseconds. |
| -void CurrentTmTime(struct tm *tm, int *microseconds); |
| - |
| // Returns a future timestamp, 'elapsed' milliseconds from now. |
| uint32_t TimeAfter(int32_t elapsed); |
| -// Comparisons between time values, which can wrap around. |
| -bool TimeIsBetween(uint32_t earlier, |
| - uint32_t middle, |
| - uint32_t later); // Inclusive |
| bool TimeIsLaterOrEqual(uint32_t earlier, uint32_t later); // Inclusive |
| bool TimeIsLater(uint32_t earlier, uint32_t later); // Exclusive |
| @@ -70,6 +60,7 @@ inline uint32_t TimeMax(uint32_t ts1, uint32_t ts2) { |
| return TimeIsLaterOrEqual(ts1, ts2) ? ts2 : ts1; |
| } |
| +// TODO(nisse): Unused, but kept for symmetry with TimeMax. |
|
perkj_webrtc
2016/04/07 05:31:29
nit: Remove pointless todo.
|
| // Returns the earlier of two timestamps. |
| inline uint32_t TimeMin(uint32_t ts1, uint32_t ts2) { |
| return TimeIsLaterOrEqual(ts1, ts2) ? ts1 : ts2; |
| @@ -93,11 +84,6 @@ inline int32_t TimeUntil(uint32_t later) { |
| return TimeDiff(later, Time()); |
| } |
| -// Converts a unix timestamp in nanoseconds to an NTP timestamp in ms. |
| -inline int64_t UnixTimestampNanosecsToNtpMillisecs(int64_t unix_ts_ns) { |
| - return unix_ts_ns / kNumNanosecsPerMillisec + kJan1970AsNtpMillisecs; |
| -} |
| - |
| class TimestampWrapAroundHandler { |
| public: |
| TimestampWrapAroundHandler(); |