<div dir="ltr">Dear Haskellers,<br><br>I am baffled by a strange bug (?) with threadDelay on Windows. It delays for less time than expected (500 seconds vs expected 24 hours), and is consistently reproducible on my system. Can someone have a look (need some patience, ~8 minutes waiting), just to be sure? I glanced around trac but didn't find any related issues.<br><br>How to reproduce:<br><br>module Main where<br><br>import Data.Time<br>import Control.Concurrent<br>import Control.Monad<br><br>main :: IO ()<br>main = do<br>  _ <- forkIO thread<br>  getLine >>= print  -- Just to keep the main thread running<br><br>thread :: IO ()<br>thread = forever $ do<br>  now <- getCurrentTime<br>  print now<br>  threadDelay 86400000000<br>  print "done waiting"<br><br><br>Expected result:<br>2016-12-28 13:07:49.5113098 UTC<br>...<br>(next timing should be the next day 2016-12-29)<br><br><br>Actual result:<br>2016-12-28 13:07:49.5113098 UTC<br>"done waiting"<br>2016-12-28 13:16:10.2159485 UTC<br>"done waiting"<br>2016-12-28 13:24:30.8735845 UTC<br>"done waiting"<br>2016-12-28 13:32:51.5292203 UTC<br>...<br><br><br>System: Windows 7 Enterprise Service Pack 1, ghc 7.10.3<br><br><br>This seems specific to Windows, it doesn't appear on Debian 8. Help is appreciated!<br><br><br>Regards,<br>Hon<br><br>Rant: It has cost me significant debugging time! Please tell me I made a rookie mistake or misread the docs somewhere!<br></div>