diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-08 17:36:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-08 17:36:55 -0400 |
commit | 62ba14fe517bab8a14a05ff1be14fc148947fc10 (patch) | |
tree | 8a16fd416a9bc81b967a2d6fb9ba1f27ef2e69f0 | |
parent | 92c4e5bffa7a82b78b5e5e79fa3d97f82d8dff0f (diff) |
update for Duration type change
-rw-r--r-- | Command/Fsck.hs | 2 | ||||
-rw-r--r-- | Limit.hs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 980a1e3cf..3b89c550c 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 @@ -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 |