projects
/
valheim_web.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ebb570
)
Display days (uptime)
author
Greg Burri
<greg.burri@gmail.com>
Mon, 8 Mar 2021 13:49:39 +0000
(14:49 +0100)
committer
Greg Burri
<greg.burri@gmail.com>
Mon, 8 Mar 2021 13:49:39 +0000
(14:49 +0100)
backend/src/valheim_controller.rs
patch
|
blob
|
history
diff --git
a/backend/src/valheim_controller.rs
b/backend/src/valheim_controller.rs
index
2ce5ea4
..
cf18e08
100644
(file)
--- a/
backend/src/valheim_controller.rs
+++ b/
backend/src/valheim_controller.rs
@@
-19,7
+19,8
@@
impl ValheimExe {
pub fn format_uptime(&self) -> String {
\r
let mins = self.uptime / 60;
\r
let hours = mins / 60;
\r
- format!("{}h{}min", hours, mins - 60 * hours)
\r
+ let days = hours / 24;
\r
+ format!("{}d{}h{}min", days, hours - 24 * days, mins - 60 * hours)
\r
}
\r
}
\r
\r