diff --git a/src/Stopwatch.rs b/src/Stopwatch.rs index 2bf83e4..ac2c04b 100644 --- a/src/Stopwatch.rs +++ b/src/Stopwatch.rs @@ -88,14 +88,15 @@ impl Stopwatch{ timeRes += 1; } //Check if the duration needs reduced to minutes - if(duration >= 120.0){ + if((duration >= 120.0) && (timeRes == TimeResolution::SECOND as i32)){ duration /= 60.0; timeRes = TimeResolution::MINUTE as i32; - } - //Check if the duration needs reduced to hours - if(duration >= 60.0){ - duration /= 60.0; - timeRes = TimeResolution::HOUR as i32; + + //Check if the duration needs reduced to hours + if(duration >= 60.0){ + duration /= 60.0; + timeRes = TimeResolution::HOUR as i32; + } } //Turn the number into a string