mirror of https://github.com/stella-emu/stella.git
Use actual time since the current log window started for log messages.
This commit is contained in:
parent
5b0b8cd5cb
commit
d5d9618def
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue