From: Greg Burri Date: Mon, 8 Mar 2021 13:49:39 +0000 (+0100) Subject: Display days (uptime) X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=c06453cb2e95d2b4b7e81c3b80b45877d2010f75;p=valheim_web.git Display days (uptime) --- 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) } }