public
Created

  • Download Gist
gistfile1.hs
Haskell
1 2 3 4 5 6
loop :: Integer -> Integer -> IO ()
loop time steps = do
timeNow <- getCPUTime
threadDelay $ max 0 $ fromIntegral $ (steps * 1000000) - ((timeNow - time) `div` 1000000)
loop time (steps + 1)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.