aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.com>2010-03-05 16:13:24 -0300
committerEugeni Dodonov <eugeni@mandriva.com>2010-03-05 16:13:24 -0300
commit1a03a7f95d49d08c57c0b326021eeab6be9e2b76 (patch)
tree2872a9f29a4cdf94bce1fe2fbc58f46dac1ffcb6
parent7941a2b9e32abbcd3fcf79aa5b49c6fb1adc60a3 (diff)
downloadnet_monitor-1a03a7f95d49d08c57c0b326021eeab6be9e2b76.tar
net_monitor-1a03a7f95d49d08c57c0b326021eeab6be9e2b76.tar.gz
net_monitor-1a03a7f95d49d08c57c0b326021eeab6be9e2b76.tar.bz2
net_monitor-1a03a7f95d49d08c57c0b326021eeab6be9e2b76.tar.xz
net_monitor-1a03a7f95d49d08c57c0b326021eeab6be9e2b76.zip
properly calculate uptime (duh..)
-rw-r--r--src/monitor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/monitor.py b/src/monitor.py
index a7e7f76..a6be211 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -297,7 +297,7 @@ class Monitor:
else:
curtime = int(time.time())
uptime = curtime - uptime
- mins = uptime / 60.0
- hours = mins / 60.0
+ hours = uptime / 3600
+ mins = (uptime - (hours * 3600)) / 60
secs = uptime % 60
- return _("%d hours, %d minutes, %d seconds") % (hours, mins, secs)
+ return _("%d: %d hours, %d minutes, %d seconds") % (uptime, hours, mins, secs)