Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Timer Events? (matthew coolbeth)
   2. Re:  Timer Events? (Edward Z. Yang)


----------------------------------------------------------------------

Message: 1
Date: Tue, 30 Nov 2010 16:49:52 -0500
From: matthew coolbeth <[email protected]>
Subject: [Haskell-beginners] Timer Events?
To: <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="UTF-8"

I'd like to write a Haskell program that executes an IO action every
50 milliseconds.
It would be most helpful if someone could point me in the right direction.

-- 
mac



------------------------------

Message: 2
Date: Tue, 30 Nov 2010 17:15:20 -0500
From: "Edward Z. Yang" <[email protected]>
Subject: Re: [Haskell-beginners] Timer Events?
To: matthew coolbeth <[email protected]>
Cc: beginners <[email protected]>
Message-ID: <1291155267-sup-2...@ezyang>
Content-Type: text/plain; charset=UTF-8

Excerpts from matthew coolbeth's message of Tue Nov 30 16:49:52 -0500 2010:
> I'd like to write a Haskell program that executes an IO action every
> 50 milliseconds.
> It would be most helpful if someone could point me in the right direction.

Hello Matthew,

Check out forkIO and threadDelay.

http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Concurrent.html

Basically, you can fork a thread and then have it do something, delay 50 ms,
and then invoke itself again.

Edward



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 30, Issue 1
****************************************

Reply via email to