summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Run/Exec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/Run/Exec.hs')
-rw-r--r--src/Xmobar/Run/Exec.hs12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/Xmobar/Run/Exec.hs b/src/Xmobar/Run/Exec.hs
index ad68232..d8cf81a 100644
--- a/src/Xmobar/Run/Exec.hs
+++ b/src/Xmobar/Run/Exec.hs
@@ -21,20 +21,10 @@ module Xmobar.Run.Exec (Exec (..), tenthSeconds, doEveryTenthSeconds) where
import Prelude
import Data.Char
-import Control.Concurrent
-import Xmobar.App.Timer (doEveryTenthSeconds)
+import Xmobar.App.Timer (doEveryTenthSeconds, tenthSeconds)
import Xmobar.System.Signal
--- | Work around to the Int max bound: since threadDelay takes an Int, it
--- 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 (x * 100000)
- tenthSeconds (s - x)
- | otherwise = threadDelay (s * 100000)
- where x = (maxBound :: Int) `div` 100000
-
class Show e => Exec e where
alias :: e -> String
alias e = takeWhile (not . isSpace) $ show e