summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors/Top.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-09 01:15:41 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-09 01:15:41 +0100
commita708d0defae7db40f01e294be44829e7a2f30be8 (patch)
treea30fea9904a25b7d3eaf77f5a41a2e4ef75dda74 /Plugins/Monitors/Top.hs
parentf7cbb14d9ee40d07abcde45868507f858e072fdd (diff)
downloadxmobar-a708d0defae7db40f01e294be44829e7a2f30be8.tar.gz
xmobar-a708d0defae7db40f01e294be44829e7a2f30be8.tar.bz2
Network monitor: no units in reported rates
Since they're always KB/s, we left them for the template
Diffstat (limited to 'Plugins/Monitors/Top.hs')
-rw-r--r--Plugins/Monitors/Top.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Plugins/Monitors/Top.hs b/Plugins/Monitors/Top.hs
index d475204..924d4b6 100644
--- a/Plugins/Monitors/Top.hs
+++ b/Plugins/Monitors/Top.hs
@@ -134,7 +134,7 @@ topProcesses tref scale = do
atomicModifyIORef tref $ \(t0, c0) ->
let scx = realToFrac (diffUTCTime c1 c0) * scale / 100
ts = M.elems $ combineTimeInfos t0 t1
- nts = map (\(nm, t) -> (nm, t / scx)) ts
+ nts = map (\(nm, t) -> (nm, min 100 (t / scx))) ts
in ((t1, c1), (len, sortTop nts, sortTop mis))
showTimeInfo :: TimeInfo -> Monitor [String]