Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: webrtc/call/rtc_event_log_helper_thread.cc

Issue 2175713002: Log current time if we stop logging before stop_time_. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Format Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698