[Haskell-cafe] Weird thing happened when I use gtk2hs with concurrent.

2009-06-24 Thread Magicloud Magiclouds
This is the weird code, please see line 61. 20 cpuNew :: IO CPU 21 cpuNew = do 22   self - meterNew 23   usage - newIORef $ CPUusage 0 0 0 0 0 0 0 0 24   self `on` realize $ do 25     forkIO $ redraw self usage 33     return () 34   return self 35   where 56     redraw self usage = do 57      

Re: [Haskell-cafe] Weird thing happened when I use gtk2hs with concurrent.

2009-06-24 Thread Martijn van Steenbergen
Magicloud Magiclouds wrote: 61 threadDelay 1 -- ten seconds, but it just refresh crazy! That's because threadDelay expects microseconds, not milliseconds. Try multiplying your delay by 1000. HTH, Martijn. ___ Haskell-Cafe mailing list