From 1a03a7f95d49d08c57c0b326021eeab6be9e2b76 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Fri, 5 Mar 2010 16:13:24 -0300 Subject: properly calculate uptime (duh..) --- src/monitor.py | 6 +++--- 1 file 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) -- cgit v1.2.1