summaryrefslogtreecommitdiffhomepage
path: root/Replay.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Replay.hs')
-rw-r--r--Replay.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Replay.hs b/Replay.hs
index 8d2e3ae..c2c520e 100644
--- a/Replay.hs
+++ b/Replay.hs
@@ -15,7 +15,7 @@ replay opts = go =<< streamLog (replayLogFile opts)
go (Right l:ls) = do
case loggedMessage l of
User (ActivityMessage a) -> do
- maybe (return ()) realisticDelay (elapsedTime a)
+ realisticDelay (elapsedTime a)
B.hPut stdout $ val $ seenData $ activity a
hFlush stdout
User (ControlMessage _) -> return ()
@@ -24,4 +24,6 @@ replay opts = go =<< streamLog (replayLogFile opts)
go (Left l:_) = error $ "Failed to parse a line of the log: " ++ l
realisticDelay :: ElapsedTime -> IO ()
-realisticDelay (ElapsedTime n) = delay $ ceiling $ n * 1000000
+realisticDelay (ElapsedTime n)
+ | n < 1 = return ()
+ | otherwise = delay $ ceiling $ n * 1000000