Best way to implement a resettable timer.
From: RJGraham (null_at_null.com)
Date: 05/27/04
- Next message: silviu: "Re: Solaris compiler (CC) builds but doesn't link"
- Previous message: David Schwartz: "Re: [OT] Re: writing a dailer in c for a 8051 based system"
- Next in thread: Måns Rullgård: "Re: Best way to implement a resettable timer."
- Reply: Måns Rullgård: "Re: Best way to implement a resettable timer."
- Reply: Barry Margolin: "Re: Best way to implement a resettable timer."
- Reply: David Schwartz: "Re: Best way to implement a resettable timer."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 May 2004 08:36:49 -0700
What's the best way to to implement a resettable timer, kind of like a
watchdog timer that can be reset.
I want to be able to start a timer to wait on an event, and either
timeout, or reset the timer to wait on the next event. The idea here is
to detect timeouts in my application.
select() would seem to be the obvious choice, but I need a file
descriptor and my timeouts are not necessarily tied to file i/o (or
other I/O).
Is it acceptable to open a file descriptor on '/dev/null' and FD_SET it
to break out of a select() wait for my timer?
Otherwise, how can I create a fd to use with select that is not tied to
file I/O, that I can set/reset ?
-Randy
- Next message: silviu: "Re: Solaris compiler (CC) builds but doesn't link"
- Previous message: David Schwartz: "Re: [OT] Re: writing a dailer in c for a 8051 based system"
- Next in thread: Måns Rullgård: "Re: Best way to implement a resettable timer."
- Reply: Måns Rullgård: "Re: Best way to implement a resettable timer."
- Reply: Barry Margolin: "Re: Best way to implement a resettable timer."
- Reply: David Schwartz: "Re: Best way to implement a resettable timer."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|