Chromium Code Reviews| Index: webrtc/base/timeutils.cc |
| diff --git a/webrtc/base/timeutils.cc b/webrtc/base/timeutils.cc |
| index 05e9ad8243be1eb9447f468bc0fae0955263eed2..a24f2299ce59374865b80667b23ea01fcf4a49ad 100644 |
| --- a/webrtc/base/timeutils.cc |
| +++ b/webrtc/base/timeutils.cc |
| @@ -74,6 +74,11 @@ uint64_t TimeNanos() { |
| // TODO: Calculate with nanosecond precision. Otherwise, we're just |
| // wasting a multiply and divide when doing Time() on Windows. |
| ticks = ticks * kNumNanosecsPerMillisec; |
| +#else |
|
pbos-webrtc
2016/01/26 15:00:22
#else #error? Do we ever build with none of these
sprang_webrtc
2016/01/27 08:48:47
Agreed it makes more sense to have #error here ins
|
| + struct timeval tv; |
| + gettimeofday(&tv, NULL); |
| + ticks = |
| + (kNumNanosecsPerSec * tv.tv_sec) + (kNumNanosecsPerMicrosec * tv.tv_usec); |
| #endif |
| return ticks; |
| } |