StopWatchPresenter::Time StopWatchPresenter::GetTimeStructure(milliseconds time)
{
+ time = milliseconds((unsigned)std::round((double)time.count() / 10) * 10);
+
Time ts;
ts.Hour = duration_cast<hours>(time).count() % 100;
ts.Min = duration_cast<minutes>(time).count() % 60;
ts.Sec = duration_cast<seconds>(time).count() % 60;
- ts.Msec = duration_cast<milliseconds>(time).count() % 1000;
+ ts.Msec = duration_cast<milliseconds>(time).count() % 1000 / 10;
return ts;
}
auto ts = GetTimeStructure(time);
std::stringstream stringStream;
- ts.Msec = (unsigned)std::round((double)ts.Msec / 10);
-
if (ts.Hour > 0)
stringStream << (unsigned)(ts.Hour / 10) << ts.Hour % 10 << ":";