Chromium Code Reviews| Index: webrtc/call/rtc_event_log_helper_thread.cc |
| diff --git a/webrtc/call/rtc_event_log_helper_thread.cc b/webrtc/call/rtc_event_log_helper_thread.cc |
| index b1b6990a2449862fb8dfe0e7cff54d1c4486859b..c0f89726311bbc1c983f43291327463289ec0e82 100644 |
| --- a/webrtc/call/rtc_event_log_helper_thread.cc |
| +++ b/webrtc/call/rtc_event_log_helper_thread.cc |
| @@ -224,7 +224,11 @@ void RtcEventLogHelperThread::StopLogFile() { |
| output_string_.clear(); |
| rtclog::Event end_event; |
| - end_event.set_timestamp_us(stop_time_); |
| + // This function can be called either because we have reached the stop time, |
| + // or because we have reached the log file size limit. Therefore, use the |
| + // current time if we have not reached the time limit. |
| + end_event.set_timestamp_us( |
| + std::min(stop_time_, clock_->TimeInMicroseconds())); |
|
ivoc
2016/07/27 09:18:00
Do you know if the value from TimeInMicroseconds()
pbos-webrtc
2016/07/27 16:44:20
This should never wrap. (It calls rtc::TimeMicros(
terelius
2016/07/27 20:34:40
When I wrote the code, I assumed that the 64-bit t
|
| end_event.set_type(rtclog::Event::LOG_END); |
| AppendEventToString(&end_event); |