From 2a71487437ca4afed6f35acc1e16c2e03bfc053c Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Tue, 13 Aug 2019 22:37:01 +0200 Subject: 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. --- src/Xmobar/Run/Command.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Xmobar/Run/Command.hs') diff --git a/src/Xmobar/Run/Command.hs b/src/Xmobar/Run/Command.hs index 0953132..e6153c1 100644 --- a/src/Xmobar/Run/Command.hs +++ b/src/Xmobar/Run/Command.hs @@ -41,7 +41,7 @@ instance Exec Command where start (Com p as al r) cb = start (ComX p as ("Could not execute command " ++ p) al r) cb start (ComX prog args msg _ r) cb = if r > 0 then go else exec - where go = exec >> tenthSeconds r >> go + where go = doEveryTenthSeconds r exec exec = do (i,o,e,p) <- runInteractiveProcess prog args Nothing Nothing exit <- waitForProcess p -- cgit v1.2.3