From 23f04635cc26e1b0553088f28553f518488a9fc8 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 1 May 2019 15:52:32 +0200 Subject: Setup personal page with Hakyll --- src/Daemon.hs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/Daemon.hs (limited to 'src/Daemon.hs') diff --git a/src/Daemon.hs b/src/Daemon.hs deleted file mode 100644 index 1351ad5..0000000 --- a/src/Daemon.hs +++ /dev/null @@ -1,18 +0,0 @@ -module Daemon - ( runDaemon - ) where - -import Control.Concurrent (threadDelay) -import Control.Monad (forever) - -import Daemon.Frequency - -runDaemon :: Frequency -> (() -> IO ()) -> IO () -runDaemon frequency process = - forever $ do - process () - threadDelay (sleepDelayMs frequency) - -sleepDelayMs :: Frequency -> Int -sleepDelayMs Hourly = 1000000 * 60 * 60 -sleepDelayMs Daily = (sleepDelayMs Hourly) * 24 -- cgit v1.2.3