aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2020-05-28 23:05:29 +0200
committerPapoteur <papoteur@mageia.org>2020-05-28 23:05:29 +0200
commit4bdc9a3dea4411ac8512df66667c42707d0fbd4a (patch)
tree8a948a138e7aefca07125bb7bc5ab1aacc98afaf /src
parent4db52fb5a8d9cd4c6fd53e7a9019cf01db72bdeb (diff)
downloadnet_monitor-4bdc9a3dea4411ac8512df66667c42707d0fbd4a.tar
net_monitor-4bdc9a3dea4411ac8512df66667c42707d0fbd4a.tar.gz
net_monitor-4bdc9a3dea4411ac8512df66667c42707d0fbd4a.tar.bz2
net_monitor-4bdc9a3dea4411ac8512df66667c42707d0fbd4a.tar.xz
net_monitor-4bdc9a3dea4411ac8512df66667c42707d0fbd4a.zip
Fix displaying Connection time (hours and minutes were always zero)
Diffstat (limited to 'src')
-rw-r--r--src/monitor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/monitor.py b/src/monitor.py
index ac625e6..7923103 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -434,7 +434,7 @@ class Monitor:
else:
curtime = int(time.time())
uptime = curtime - uptime
- hours = uptime / 3600
- mins = (uptime - (hours * 3600)) / 60
+ hours = uptime // 3600
+ mins = (uptime - (hours * 3600)) // 60
secs = uptime % 60
return _("%(hours)d hours, %(mins)d minutes, %(secs)d seconds") % {"hours" : hours, "mins" : mins, "secs" : secs}