Minor fix/tweak to display timer output

This commit is contained in:
Stephen Seo 2021-09-16 14:46:44 +09:00
parent ca925a9b50
commit 7a7883d359

View file

@ -418,6 +418,9 @@ fn seconds_to_time(seconds: f64) -> String {
} else { } else {
result = String::new(); result = String::new();
} }
if new_seconds < 10.0 {
result.push('0');
}
result.push_str(&new_seconds.to_string()); result.push_str(&new_seconds.to_string());
let idx_result = result.find('.'); let idx_result = result.find('.');
if let Some(idx) = idx_result { if let Some(idx) = idx_result {