aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-09-22 04:43:07 +0000
committerr <r@freesoftwareextremist.com>2020-09-22 04:43:07 +0000
commitc753a74f49466d155fa432001f4c4aab53bb718f (patch)
treea732b0a83801f6e30dc9387f98b264b022f1570d /renderer
parent79d4ff4b08f249ce69ed4291d937a50165ed0b86 (diff)
downloadbloat-c753a74f49466d155fa432001f4c4aab53bb718f.tar.gz
bloat-c753a74f49466d155fa432001f4c4aab53bb718f.zip
Update time duration calculation
Diffstat (limited to 'renderer')
-rw-r--r--renderer/renderer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/renderer/renderer.go b/renderer/renderer.go
index 560e9b7..a5619c2 100644
--- a/renderer/renderer.go
+++ b/renderer/renderer.go
@@ -80,19 +80,19 @@ func DurToStr(dur time.Duration) string {
return strconv.Itoa(int(s)) + "s"
}
m := dur.Minutes()
- if m < 60 {
+ if m < 60*2 {
return strconv.Itoa(int(m)) + "m"
}
h := dur.Hours()
- if h < 24 {
+ if h < 24*2 {
return strconv.Itoa(int(h)) + "h"
}
d := h / 24
- if d < 30 {
+ if d < 30*2 {
return strconv.Itoa(int(d)) + "d"
}
mo := d / 30
- if mo < 12 {
+ if mo < 12*2 {
return strconv.Itoa(int(mo)) + "mo"
}
y := mo / 12