Skip to content

Commit

Permalink
Add a bit of a delay so that we can see the progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
yav committed Jul 10, 2018
1 parent 5644309 commit 133d6c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crucible-c/src/ProgressBar.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ import System.IO
import System.Console.ANSI
import Control.Monad(zipWithM)

import Control.Concurrent


prepStatus :: String -> Int -> (Integer -> IO (), IO ())
prepStatus pref tot = (start,end)
where
start n = do putStr (msg n)
hFlush stdout
end = cursorBackward msgLen
end = do threadDelay 100000
cursorBackward msgLen

totS = show tot
totW = length totS
Expand Down

0 comments on commit 133d6c9

Please sign in to comment.