summaryrefslogtreecommitdiffhomepage
path: root/src/Commands.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-08-21 19:48:44 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-08-21 19:48:44 +0200
commit1fab853cb8a76eb9b7c5400924a8c53b3b095712 (patch)
tree54f20fb5987904700669d67519cc45169ae78bb7 /src/Commands.hs
parent8afb450eb104e5335f4b1b976512842f7059142c (diff)
parent4a57c777bccbf169aa50411ecaed0af333ac6871 (diff)
downloadxmobar-1fab853cb8a76eb9b7c5400924a8c53b3b095712.tar.gz
xmobar-1fab853cb8a76eb9b7c5400924a8c53b3b095712.tar.bz2
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'src/Commands.hs')
-rw-r--r--src/Commands.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Commands.hs b/src/Commands.hs
index 38d0aed..1bfbb94 100644
--- a/src/Commands.hs
+++ b/src/Commands.hs
@@ -75,8 +75,7 @@ instance Exec Command where
-- is not possible to set a thread delay grater than about 45 minutes.
-- With a little recursion we solve the problem.
tenthSeconds :: Int -> IO ()
-tenthSeconds s | s >= x = do threadDelay y
- tenthSeconds (x - s)
+tenthSeconds s | s >= x = do threadDelay (x * 100000)
+ tenthSeconds (s - x)
| otherwise = threadDelay (s * 100000)
- where y = maxBound :: Int
- x = y `div` 100000
+ where x = (maxBound :: Int) `div` 100000