diff options
author | iximeow <me@iximeow.net> | 2023-06-24 20:33:17 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-06-24 20:33:17 -0700 |
commit | c072da6059adca4a5df41d3bd8eb57093866d4fa (patch) | |
tree | cfc4f1f43adbdedecd3f0bde0d3ea3151066965b | |
parent | 0c9da27bf0e628cfc53d281e8c1b181bad0bea8e (diff) |
modulus
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index bdbad85..ec34073 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,8 +84,8 @@ fn duration_as_human_string(duration_ms: u64) -> String { let duration_hours = duration_min / 60; let duration_ms = duration_ms % 1000; - let duration_sec = duration_sec & 60; - let duration_min = duration_hours & 60; + let duration_sec = duration_sec % 60; + let duration_min = duration_hours % 60; // no need to clamp hours, we're gonna just hope that it's a reasonable number of hours if duration_hours != 0 { |