diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-13 14:19:21 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-13 14:19:21 -0400 |
commit | 7575c5bb561bd04d6106ac09d97ea813c9ee46f3 (patch) | |
tree | 42940c5fd38b585715e3dd33dc846da25587e0b5 /Assistant | |
parent | 24da48816d936316753be6cabfe83e3e51af647b (diff) |
tweak
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/DaemonStatus.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index eb8ff256b..dfd3c44f3 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -51,14 +51,14 @@ daemonStatusThread :: ThreadState -> DaemonStatusHandle -> IO () daemonStatusThread st handle = do checkpoint forever $ do - threadDelay tenMinutes + threadDelay (tenMinutes * oneSecond) checkpoint where checkpoint = runThreadState st $ do file <- fromRepo gitAnnexDaemonStatusFile status <- getDaemonStatus handle liftIO $ writeDaemonStatusFile file status - tenMinutes = 10 * 60 * 1000000 -- microseconds + oneSecond = 1000000 -- microseconds {- Don't just dump out the structure, because it will change over time, - and parts of it are not relevant. -} @@ -100,4 +100,7 @@ afterLastDaemonRun :: EpochTime -> DaemonStatus -> Bool afterLastDaemonRun timestamp status = maybe False (< t) (lastRunning status) where t = realToFrac (timestamp + slop) :: POSIXTime - slop = 10 * 60 + slop = fromIntegral tenMinutes + +tenMinutes :: Int +tenMinutes = 10 * 60 |