diff options
Diffstat (limited to 'src/ui')
-rwxr-xr-x | src/ui/task_details.rs | 6 | ||||
-rwxr-xr-x | src/ui/task_row.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs index 2e9d154..4edd7bb 100755 --- a/src/ui/task_details.rs +++ b/src/ui/task_details.rs @@ -137,9 +137,9 @@ impl FurTaskDetails { let total_time = stop_time - start_time; let total_time = total_time.num_seconds(); - let h = total_time / 60 / 60; - let m = (total_time / 60) - (h * 60); - let s = total_time - (m * 60); + let h = total_time / 3600; + let m = total_time % 3600 / 60; + let s = total_time % 60; let mut total_time_str = format!("{:02}:{:02}:{:02}", h, m, s); if !settings_manager::get_bool("show-seconds") { total_time_str = format!("{:02}:{:02}", h, m); diff --git a/src/ui/task_row.rs b/src/ui/task_row.rs index cd0c69a..d4bcaec 100755 --- a/src/ui/task_row.rs +++ b/src/ui/task_row.rs @@ -114,9 +114,9 @@ impl FurTaskRow { } } // Format total time to readable string - let h = total_time / 60 / 60; - let m = (total_time / 60) - (h * 60); - let s = total_time - (m * 60); + let h = total_time / 3600; + let m = total_time % 3600 / 60; + let s = total_time % 60; let mut total_time_str = format!("{:02}:{:02}:{:02}", h, m, s); if !settings_manager::get_bool("show-seconds") { |