Skip to content

Commit 57faba4

Browse files
committed
make compile with latest V
1 parent 622c5e8 commit 57faba4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ pub fn (mut app App) running_since() string {
1010

1111
seconds_in_hour := 60 * 60
1212

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
13+
days := int(math.floor(f64(duration) / f64(seconds_in_hour * 24)))
14+
hours := int(math.fmod(math.floor(f64(duration) / f64(seconds_in_hour)), 24))
15+
minutes := int(math.floor(f64(duration) / 60.0)) % 60
1616
seconds := duration % 60
1717

1818
return '${days} days ${hours} hours ${minutes} minutes and ${seconds} seconds'

0 commit comments

Comments
 (0)