diff options
author | jao <jao@gnu.org> | 2020-10-09 17:51:07 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-10-09 17:51:07 +0100 |
commit | 407866c433735e510b6bde2d06e2a18cff22c470 (patch) | |
tree | f7f73bc4f30f52844f5582c321e97d0375dce1b2 /src/Xmobar/App/Timer.hs | |
parent | e71512b7c961ab379aee98c2f4d65ad4bdd3c5bf (diff) | |
download | xmobar-407866c433735e510b6bde2d06e2a18cff22c470.tar.gz xmobar-407866c433735e510b6bde2d06e2a18cff22c470.tar.bz2 |
hlinting
Diffstat (limited to 'src/Xmobar/App/Timer.hs')
-rw-r--r-- | src/Xmobar/App/Timer.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/App/Timer.hs b/src/Xmobar/App/Timer.hs index cf59630..23c48c0 100644 --- a/src/Xmobar/App/Timer.hs +++ b/src/Xmobar/App/Timer.hs @@ -2,7 +2,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Xmobar.App.Timer --- Copyright: (c) 2019 Tomáš Janoušek +-- Copyright: (c) 2019, 2020 Tomáš Janoušek -- License: BSD3-style (see LICENSE) -- -- Maintainer: Tomáš Janoušek <tomi@nomi.cz> @@ -54,7 +54,7 @@ newPeriod :: Int64 -> IO (Unique, Period) newPeriod r = do u <- newUnique t <- now - v <- atomically newEmptyTMVar + v <- newEmptyTMVarIO let t' = t - t `mod` r return (u, Period { rate = r, next = t', tick = v }) @@ -212,7 +212,7 @@ delayUntilNextFire = do delay = (tNext - tNow) `min` fromIntegral maxDelay delayUsec = fromIntegral delay * 100000 registerDelay delayUsec - Nothing -> atomically $ newTVar False + Nothing -> newTVarIO False atomically $ do delayOver <- readTVar delayVar periods' <- fromJust <$> readTVar periodsVar |