Commit d5d9618d authored by Christian Speckner's avatar Christian Speckner
Browse files

Use actual time since the current log window started for log messages.

parent 5b0b8cd5
......@@ -87,12 +87,16 @@ void StaggeredLogger::_log()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void StaggeredLogger::logLine()
{
high_resolution_clock::time_point now = high_resolution_clock::now();
Int64 millisecondsSinceLastLogEvent =
duration_cast<duration<Int64, std::milli>>(now - myCurrentIntervalStartTimestamp).count();
stringstream ss;
ss
<< currentTimestamp() << ": "
<< myMessage
<< " (" << myCurrentEventCount << " times in "
<< myCurrentIntervalSize << " milliseconds"
<< millisecondsSinceLastLogEvent << " milliseconds"
<< ")";
myLogger(ss.str());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment