diff options
author | jao <jao@gnu.org> | 2011-08-08 16:32:40 -0700 |
---|---|---|
committer | jao <jao@gnu.org> | 2011-08-08 16:32:40 -0700 |
commit | 4a57c777bccbf169aa50411ecaed0af333ac6871 (patch) | |
tree | 9a84f935e6e5494e7582f70e75cbd0e471ddfe2e /src/Commands.hs | |
parent | d533011ff9bbc082d445efb3dd1f4ad64a5e9c5f (diff) | |
parent | 5d8ce11cd18f8c2458046af03a6909434954704a (diff) | |
download | xmobar-4a57c777bccbf169aa50411ecaed0af333ac6871.tar.gz xmobar-4a57c777bccbf169aa50411ecaed0af333ac6871.tar.bz2 |
Merge pull request #22 from nzeh/master
CoreTemp fix
Diffstat (limited to 'src/Commands.hs')
-rw-r--r-- | src/Commands.hs | 7 |
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 |