mirror of
https://bitbucket.org/Mattrixwv/my-classes.git
synced 2025-12-06 18:23:57 -05:00
Adjusted string output to show minutes and hours
when the previous resolutionis over 120
This commit is contained in:
@@ -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 << ' ';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user