From c06453cb2e95d2b4b7e81c3b80b45877d2010f75 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Mon, 8 Mar 2021 14:49:39 +0100 Subject: [PATCH] Display days (uptime) --- backend/src/valheim_controller.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/valheim_controller.rs b/backend/src/valheim_controller.rs index 2ce5ea4..cf18e08 100644 --- a/backend/src/valheim_controller.rs +++ b/backend/src/valheim_controller.rs @@ -19,7 +19,8 @@ impl ValheimExe { pub fn format_uptime(&self) -> String { let mins = self.uptime / 60; let hours = mins / 60; - format!("{}h{}min", hours, mins - 60 * hours) + let days = hours / 24; + format!("{}d{}h{}min", days, hours - 24 * days, mins - 60 * hours) } } -- 2.45.2