[plt-scheme] Can I create an event that's like an alarm, but can be reset?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Aug 8 17:18:50 EDT 2007

I think you can code that up with threads and channels. If you want a
GUI event (instead of an evt) you might want to check out timer%.


On 8/8/07, Eric Hanchrow <offby1 at blarg.net> wrote:
> Here's what I'd like: an event that I create just like an alarm (i.e.,
> by calling, say (define a (resettable-alarm-evt 1234))).  It acts just
> like an alarm, _except_ if, before it is ready, I call (reset-alarm!
> a), then it will now be another 1234 milliseconds before it goes off
> (assuming I don't reset it yet again).
> Is there some way I can create such a thing?  Or perhaps I can use an
> existing synchronizeable event, but to be blunt the docs for events
> make my eyes glaze over -- I don't understand what half of the event
> types are for.
> --
> 'The energy capacity of batteries is increasing 5 percent to
> 8 percent annually, but demand is increasing exponentially,'
> Mr. Cooper said.
>         -- New York Times
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.