summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/DateZone.hs
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2019-08-13 22:37:01 +0200
committerTomas Janousek <tomi@nomi.cz>2020-02-22 18:13:35 +0000
commit2a71487437ca4afed6f35acc1e16c2e03bfc053c (patch)
treee7fba202b0554f9c9dca5b14d8e87cac3a50f697 /src/Xmobar/Plugins/DateZone.hs
parent8403251f2bff2d803f2e4f3d55b363673570c3c7 (diff)
downloadxmobar-2a71487437ca4afed6f35acc1e16c2e03bfc053c.tar.gz
xmobar-2a71487437ca4afed6f35acc1e16c2e03bfc053c.tar.bz2
Refactor code from tenthSeconds to doEveryTenthSeconds
A preparation for timer coalescing: tenthSeconds is just a sleep whereas doEveryTenthSeconds enables using a central timer and waiting for all monitors to update before refreshing the window. This commit is just a simple refactor, the actual timer coalescing code comes later.
Diffstat (limited to 'src/Xmobar/Plugins/DateZone.hs')
-rw-r--r--src/Xmobar/Plugins/DateZone.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xmobar/Plugins/DateZone.hs b/src/Xmobar/Plugins/DateZone.hs
index 35767a8..7ac3ea1 100644
--- a/src/Xmobar/Plugins/DateZone.hs
+++ b/src/Xmobar/Plugins/DateZone.hs
@@ -72,7 +72,7 @@ instance Exec DateZone where
else
go (date f locale)
- where go func = func >>= cb >> tenthSeconds r >> go func
+ where go func = doEveryTenthSeconds r $ func >>= cb
{-# NOINLINE localeLock #-}
-- ensures that only one plugin instance sets the locale