Enhance StopWatch

Clean up, comments and enhancements. StopWatch lap() didn't mean lap-time, but elapsed time. Changed meaning to lap-time and added split() for split-time.
This commit is contained in:
Niclas Antti
2018-09-26 16:24:45 +03:00
parent bb8245d2c1
commit c65edd1298
5 changed files with 104 additions and 35 deletions

View File

@ -42,7 +42,7 @@ void EventCount::increment()
if (m_timestamps.empty()
|| m_timestamps.back().time_point.time_since_epoch().count() != ticks)
{
m_timestamps.emplace_back(TimePoint(ticks), 1);
m_timestamps.emplace_back(TimePoint(Duration(nanoseconds(ticks))), 1);
}
else
{