Chromium Code Reviews| Index: webrtc/base/logging.cc |
| diff --git a/webrtc/base/logging.cc b/webrtc/base/logging.cc |
| index 60603624a5e1dfacf4784fa849dd9d235c18d4ef..fc5653fb3405a03305ba8112562481ab0c291d13 100644 |
| --- a/webrtc/base/logging.cc |
| +++ b/webrtc/base/logging.cc |
| @@ -124,7 +124,9 @@ LogMessage::LogMessage(const char* file, |
| const char* module) |
| : severity_(sev), tag_(kLibjingle) { |
| if (timestamp_) { |
| - int64_t time = TimeSince(LogStartTime()); |
| + // Use SystemTimeNanos so that even if tests use fake clocks, the timestamp |
| + // in log messages represents the real system time. |
|
pthatcher1
2016/06/15 21:20:20
SystemTimeNanos or SystemTimeMillis?
Taylor Brandstetter
2016/06/16 00:15:05
Fixed.
|
| + int64_t time = TimeDiff(SystemTimeMillis(), LogStartTime()); |
| // Also ensure WallClockStartTime is initialized, so that it matches |
| // LogStartTime. |
| WallClockStartTime(); |
| @@ -210,7 +212,7 @@ LogMessage::~LogMessage() { |
| } |
| int64_t LogMessage::LogStartTime() { |
| - static const int64_t g_start = TimeMillis(); |
| + static const int64_t g_start = SystemTimeMillis(); |
| return g_start; |
| } |