From 2b6747b6a2b1ddf3d505624e12cc643b603500b1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Oct 2013 17:36:55 -0400 Subject: [PATCH] update for Duration type change --- Command/Fsck.hs | 2 +- Limit.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 980a1e3cf3..3b89c550cb 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -104,7 +104,7 @@ withIncremental = withValue $ do Nothing -> noop Just started -> do now <- liftIO getPOSIXTime - when (now - realToFrac started >= delta) + when (now - realToFrac started >= durationToPOSIXTime delta) resetStartTime return True diff --git a/Limit.hs b/Limit.hs index 71dbce1687..826b5e72b9 100644 --- a/Limit.hs +++ b/Limit.hs @@ -238,7 +238,8 @@ limitSize vs s = case readSize dataUnits s of addTimeLimit :: String -> Annex () addTimeLimit s = do - let seconds = fromMaybe (error "bad time-limit") $ parseDuration s + let seconds = maybe (error "bad time-limit") durationToPOSIXTime $ + parseDuration s start <- liftIO getPOSIXTime let cutoff = start + seconds addLimit $ Right $ const $ const $ do