summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose A Ortega Ruiz <jao@gnu.org>2010-05-22 01:47:07 +0200
committerJose A Ortega Ruiz <jao@gnu.org>2010-05-22 01:47:07 +0200
commit907fdbc3d1609275fa4762baad14be22cef0530a (patch)
tree650e2a081543830268f5786322cb18796fc69997
parent04f9433002a603d2af083e648e159e5ed13fc913 (diff)
downloadxmobar-907fdbc3d1609275fa4762baad14be22cef0530a.tar.gz
xmobar-907fdbc3d1609275fa4762baad14be22cef0530a.tar.bz2
Tiny refactoring in Top.hs
Ignore-this: 59849695cd346e0cc2f5c8b44edcae7a darcs-hash:20100521234707-748be-81a3ecb8b5c5dba66187d4af3b4dc72f5ff61a6e.gz
-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 93fd940..d475204 100644
--- a/Plugins/Monitors/Top.hs
+++ b/Plugins/Monitors/Top.hs
@@ -132,7 +132,7 @@ topProcesses tref scale = do
(t1, mis, len) <- timeMemInfos
c1 <- getCurrentTime
atomicModifyIORef tref $ \(t0, c0) ->
- let scx = (fromRational . toRational $ diffUTCTime c1 c0) * scale / 100
+ let scx = realToFrac (diffUTCTime c1 c0) * scale / 100
ts = M.elems $ combineTimeInfos t0 t1
nts = map (\(nm, t) -> (nm, t / scx)) ts
in ((t1, c1), (len, sortTop nts, sortTop mis))