fix uptime calculations

This commit is contained in:
Patrick Moessler 2024-01-14 17:32:25 +01:00
parent 56713ebc2e
commit 05ca4de74c

View file

@ -51,8 +51,8 @@ time:
level: INFO
format: "%2d %2d %2d %2d"
args:
- 'uint32_t(id(runtime).state/3600) - uint32_t(id(runtime).state/86400)*86400'
- 'uint32_t(id(runtime).state/60) - uint32_t(id(runtime).state/3600)*3600'
- 'uint32_t(id(runtime).state/3600) - uint32_t(id(runtime).state/86400)*1440'
- 'uint32_t(id(runtime).state/60) - uint32_t(id(runtime).state/3600)*60'
- 'uint32_t(id(runtime).state) - uint32_t(id(runtime).state/60)*60'
- 'uint32_t((id(runtime).state - uint32_t(id(runtime).state))*25)'
@ -92,8 +92,8 @@ display:
/*it.printf(14, "%1d", 0)*/
it.printf(16, "%2d%2d%2d%2d",
uint32_t(id(runtime).state/3600) - uint32_t(id(runtime).state/86400)*86400,
uint32_t(id(runtime).state/60) - uint32_t(id(runtime).state/3600)*3600,
uint32_t(id(runtime).state/3600) - uint32_t(id(runtime).state/86400)*1440,
uint32_t(id(runtime).state/60) - uint32_t(id(runtime).state/3600)*60,
uint32_t(id(runtime).state) - uint32_t(id(runtime).state/60)*60,
uint32_t((id(runtime).state - uint32_t(id(runtime).state))*25) );