From 7e18e78e691d2f387c1ac7498b0e5f0b47847dfc Mon Sep 17 00:00:00 2001 From: draxaris1010 Date: Fri, 6 Dec 2024 13:12:15 +0100 Subject: [PATCH] fix bug --- src/main.v | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.v b/src/main.v index 2cecc26..b5df4e0 100644 --- a/src/main.v +++ b/src/main.v @@ -160,10 +160,8 @@ fn (mut app App) get_ppu() !f64 { } fn (mut app App) get_mean_time_between_pannenkoeken() !time.Duration { - time_zero := time.Time{ - unix: 0 - } - mut people := sql app.db { + time_zero := time.unix(0) + mut people := sql app.db { select from Person where (status == 3 && delivery_time > time_zero) order by delivery_time desc limit 10 }! return stats.mean(arrays.window(people, size: 2).map(it[0].delivery_time - it[1].delivery_time))