I was trying to google "haskell process sleep" without much success. It really needs some experience to construct hoogle queries correctly :) Thanks everybody for your help!
On Tue, Dec 6, 2011 at 8:07 PM, Paul R <[email protected]> wrote: > dokondr> Hi, I need to make the current process (executing thread) go to > dokondr> sleep for a given amount of time. Can't find where threadSleep > dokondr> is defined. > > Maybe because there is no such threadSleep function in base packages, > what do you think ? > > Ok, let's see if we can find what you are looking for ... You want > a function that will pause your thread for an amout of time then pass. > In other word, it would take an Int and do nothing else than wait as > a side effect, right ? Something typed "Int -> IO ()" should do that, > right ? > > http://www.haskell.org/hoogle/?hoogle=Int+-%3E+IO+%28%29 > > => threadDelay :: Int -> IO () > Suspends the current thread for a given number of microseconds ... > > And if you don't want to use the amazing power of hoogle, maybe you can > simply go to your favorite search engine and type "haskell pause thread" > in it. In mine, the first result is the doc of the Control.Concurrent > module that has a "Waiting" section (linked in the toc) that has ... > 3 functions, amongst wich "threadDelay :: Int -> IO ()". > > Wasn't hard, was it ? > > -- > Paul >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
