summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors/Top.hs
diff options
context:
space:
mode:
authorJose A Ortega Ruiz <jao@gnu.org>2010-02-16 10:05:35 +0100
committerJose A Ortega Ruiz <jao@gnu.org>2010-02-16 10:05:35 +0100
commit900b9f7a2ce212b4bdc7613aacb7e7b3c849b85c (patch)
tree8e690b2dc4bac3a62c7e56f5d2e7f1384a21e193 /Plugins/Monitors/Top.hs
parentfeec6f97138195753adc25cf5210dff8422dffff (diff)
downloadxmobar-900b9f7a2ce212b4bdc7613aacb7e7b3c849b85c.tar.gz
xmobar-900b9f7a2ce212b4bdc7613aacb7e7b3c849b85c.tar.bz2
Little nits
Ignore-this: fa0ddad969589fae157da12b7957a9f3 darcs-hash:20100216090535-748be-e1393b21ddd31f38db73fc25e5848335ff85505a.gz
Diffstat (limited to 'Plugins/Monitors/Top.hs')
-rw-r--r--Plugins/Monitors/Top.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Plugins/Monitors/Top.hs b/Plugins/Monitors/Top.hs
index 7e9f072..93b767d 100644
--- a/Plugins/Monitors/Top.hs
+++ b/Plugins/Monitors/Top.hs
@@ -76,7 +76,7 @@ getProcessData :: FilePath -> IO [String]
getProcessData pidf =
handle ((\_ -> evaluate []) :: SomeException -> IO [String])
(do s <- strictReadFile $ "/proc" </> pidf </> "stat"
- evaluate $ words $! s)
+ evaluate $! words s)
processes :: IO [FilePath]
processes = do
@@ -150,7 +150,7 @@ topTimeProcesses :: Int -> TimesRef -> Float -> IO [TimeInfo]
topTimeProcesses n tref lapse = do
t1 <- timeinfos
t0 <- readIORef tref
- writeIORef tref $! t1
+ modifyIORef tref (const $! t1)
let !ts = M.elems $ combineTimeInfos t0 t1
!sts = take n $ sortBy (flip (comparing snd)) ts
!nts = map norm sts