Adjusted string output to show minutes and hours

when the previous resolutionis over 120
This commit is contained in:
2019-03-29 12:49:15 -04:00
parent 27087ad163
commit f2f4782b06

View File

@@ -157,6 +157,17 @@ public:
}
--timeRes; //Take this variable back down to the right place. It has to go one too far to trigger the loop stop
//Check if the resolution is seconds and if there are more than 120 seconds
if((timeRes == SECOND) && (tempTime >= 120)){
++timeRes;
tempTime = getTime(static_cast<TIME_RESOLUTION>(timeRes));
}
//Check if the resolution is minutes and if there are more than 120 minutes
else if((timeRes == MINUTE) && (tempTime >= 120)){
++timeRes;
tempTime = getTime(static_cast<TIME_RESOLUTION>(timeRes));
}
//Put the number in the string
timeStr << std::fixed << std::setprecision(3) << tempTime << ' ';