Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

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 <mac01...@engr.uconn.edu>
Subject: [Haskell-beginners] Timer Events?
To: <beginners@haskell.org>
Message-ID:
        <aanlkti=2p18nmzbw2twfx_aiusz7d1xnwrgm7oz13...@mail.gmail.com>
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" <ezy...@mit.edu>
Subject: Re: [Haskell-beginners] Timer Events?
To: matthew coolbeth <mac01...@engr.uconn.edu>
Cc: beginners <beginners@haskell.org>
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
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


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

Reply via email to