summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2023-03-01 21:47:01 -0800
committerArthur She <arthur.she@linaro.org>2023-03-01 21:47:01 -0800
commit4d7dec6199e79523acc47d264e629925ffb4f612 (patch)
tree91852a6d38779817ceccf2ad4e745fb63880a1bc
parenta5a538ec379a0d305b48b13d55435df6eb57a41c (diff)
draw-timestamp-chart.py: fix ms_to_hr_min() bug
Signed-off-by: Arthur She <arthur.she@linaro.org>
-rwxr-xr-xdraw-timestamp-chart.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/draw-timestamp-chart.py b/draw-timestamp-chart.py
index e87dd0f..58be590 100755
--- a/draw-timestamp-chart.py
+++ b/draw-timestamp-chart.py
@@ -92,6 +92,9 @@ def ms_to_hr_min(millisecond):
sec = millisecond // 1000
hr = sec // (60 * 60)
min = round((sec % (60 * 60)) / 60)
+ if (min == 60):
+ hr += 1
+ min = 0
return f"{hr} hr {min} min"
if __name__ == "__main__":