Re: Alert process every minute real time? - Thanks!
- From: Charles Sullivan <cwsulliv@xxxxxxxxxxxx>
- Date: Sat, 02 Sep 2006 19:13:24 GMT
On Sat, 02 Sep 2006 09:52:26 -0700, Bill Pursell wrote:
Hadron Quark wrote:
Jan Panteltje <pNaonStpealmtje@xxxxxxxxx> writes:
On a sunny day (Sat, 02 Sep 2006 16:00:18 GMT) it happened Charles Sullivan
<cwsulliv@xxxxxxxxxxxx> wrote in
<pan.2006.09.02.16.00.17.630726@xxxxxxxxxxxx>:
A background process written in C language is expected to perform a
task each time the system clock rolls over to the next whole minute
of real time (+/- a second or two).
Is there any better way of alerting the process when this rollover
occurs other than a polling function which reads the system clock?
man 2 alarm
Is that what the OP is looking for? He wanted real time minute tick
over - different - e.g within a second of 3:59:59 -> 4:00:00
It doesn't give exactly what the OP requested, but it
certainly provides enough to do what was asked. (ie,
check the current time, calculate
the amount of time until the next minute, and then
set an alarm). I would recommend looking at
setitimer as well.
Thanks Jan, Hadron, and Bill for your responses.
What you've described is close to what I had in mind by "a polling
function which reads the system clock".
What I was wondering is whether there might be a generic system
function I was unaware of whose prototype is something like this:
void set_alarm_to_go_off_at( time_t alert_time );
I guess there isn't, and it will be up to me to write one using
the methods you guys have described.
Thanks again.
Regards,
Charles Sullivan
.
- Follow-Ups:
- Re: Alert process every minute real time? - Thanks!
- From: "Nils O. Selåsdal"
- Re: Alert process every minute real time? - Thanks!
- From: jasen
- Re: Alert process every minute real time? - Thanks!
- References:
- Alert process every minute real time?
- From: Charles Sullivan
- Re: Alert process every minute real time?
- From: Jan Panteltje
- Re: Alert process every minute real time?
- From: Hadron Quark
- Re: Alert process every minute real time?
- From: Bill Pursell
- Alert process every minute real time?
- Prev by Date: Re: Alert process every minute real time?
- Next by Date: Re: Alert process every minute real time?
- Previous by thread: Re: Alert process every minute real time?
- Next by thread: Re: Alert process every minute real time? - Thanks!
- Index(es):
Relevant Pages
|