update for Duration type change
This commit is contained in:
parent
51c44b26aa
commit
2b6747b6a2
2 changed files with 3 additions and 2 deletions
|
@ -104,7 +104,7 @@ withIncremental = withValue $ do
|
||||||
Nothing -> noop
|
Nothing -> noop
|
||||||
Just started -> do
|
Just started -> do
|
||||||
now <- liftIO getPOSIXTime
|
now <- liftIO getPOSIXTime
|
||||||
when (now - realToFrac started >= delta)
|
when (now - realToFrac started >= durationToPOSIXTime delta)
|
||||||
resetStartTime
|
resetStartTime
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
3
Limit.hs
3
Limit.hs
|
@ -238,7 +238,8 @@ limitSize vs s = case readSize dataUnits s of
|
||||||
|
|
||||||
addTimeLimit :: String -> Annex ()
|
addTimeLimit :: String -> Annex ()
|
||||||
addTimeLimit s = do
|
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
|
start <- liftIO getPOSIXTime
|
||||||
let cutoff = start + seconds
|
let cutoff = start + seconds
|
||||||
addLimit $ Right $ const $ const $ do
|
addLimit $ Right $ const $ const $ do
|
||||||
|
|
Loading…
Reference in a new issue