diff options
author | Eugeni Dodonov <eugeni@mandriva.com> | 2010-03-05 16:13:24 -0300 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.com> | 2010-03-05 16:13:24 -0300 |
commit | 1a03a7f95d49d08c57c0b326021eeab6be9e2b76 (patch) | |
tree | 2872a9f29a4cdf94bce1fe2fbc58f46dac1ffcb6 /src/monitor.py | |
parent | 7941a2b9e32abbcd3fcf79aa5b49c6fb1adc60a3 (diff) | |
download | net_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..)
Diffstat (limited to 'src/monitor.py')
-rw-r--r-- | src/monitor.py | 6 |
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) |