From c737afa79614ab46cc88d0030d283da8f733360a Mon Sep 17 00:00:00 2001 From: LastExceed Date: Tue, 13 Feb 2024 14:19:18 +0100 Subject: [PATCH] log runtime as minutes --- src/utils/logs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/logs.rs b/src/utils/logs.rs index 0605e65..73d1739 100644 --- a/src/utils/logs.rs +++ b/src/utils/logs.rs @@ -16,7 +16,7 @@ struct Record<'s> { time_booked: String, time_released: String, booking_duration: i32, //minutes - runtime: Duration, //minutes + runtime: i32, //minutes user: &'s str } @@ -27,7 +27,7 @@ pub fn machinelog(machine: &str, booking: &Booking) -> io::Result<()> { time_booked: booking.creation_datetime.time().to_string(), time_released: Local::now().time().to_string(), booking_duration: booking.creation_instant.elapsed().as_secs_f32().div(60.0).ceil() as _, - runtime: booking.total_runtime(), + runtime: booking.total_runtime().as_secs_f32().div(60.0).ceil() as _, user: &booking.user };