From 631cc55546d14b746572d4f3ed50900ec763ee27 Mon Sep 17 00:00:00 2001 From: ffaf1 <87714215+ffaf1@users.noreply.github.com> Date: Mon, 18 Oct 2021 06:43:20 +0200 Subject: [PATCH] Fix example --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 11222f0..cc41f27 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,13 @@ IO actions periodically. ### Example: ```haskell - let conf = defaultTimerConf & timerConfSetInitDelay 500 -- 500 ms - & timerConfSetInterval 1000 -- 1 s - +main :: IO () +main = do + let conf = defaultConf & setInitDelay 500 -- 500 ms + & setInterval 1000 -- 1 s + withAsyncTimer conf $ \ timer -> do forM_ [1..10] $ \_ -> do - timerWait timer + wait timer putStrLn "Tick" -``` \ No newline at end of file +```