We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 622c5e8 commit 57faba4Copy full SHA for 57faba4
src/utils.v
@@ -10,9 +10,9 @@ pub fn (mut app App) running_since() string {
10
11
seconds_in_hour := 60 * 60
12
13
- days := int(math.floor(duration / (seconds_in_hour * 24)))
14
- hours := int(math.floor(duration / seconds_in_hour % 24))
15
- minutes := int(math.floor(duration / 60)) % 60
+ days := int(math.floor(f64(duration) / f64(seconds_in_hour * 24)))
+ hours := int(math.fmod(math.floor(f64(duration) / f64(seconds_in_hour)), 24))
+ minutes := int(math.floor(f64(duration) / 60.0)) % 60
16
seconds := duration % 60
17
18
return '${days} days ${hours} hours ${minutes} minutes and ${seconds} seconds'
0 commit comments