Log current time if we stop logging before stop_time_.
This happens if we stop logging because we have reached the file size limit. The large timestamp causes problems in the analysis tool. BUG=webrtc:6138 Review-Url: https://codereview.webrtc.org/2175713002 Cr-Commit-Position: refs/heads/master@{#13581}
This commit is contained in:
@ -224,7 +224,11 @@ void RtcEventLogHelperThread::StopLogFile() {
|
|||||||
output_string_.clear();
|
output_string_.clear();
|
||||||
|
|
||||||
rtclog::Event end_event;
|
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()));
|
||||||
end_event.set_type(rtclog::Event::LOG_END);
|
end_event.set_type(rtclog::Event::LOG_END);
|
||||||
AppendEventToString(&end_event);
|
AppendEventToString(&end_event);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user