[Click] Strange timer behavior
Roberto Riggio
roberto.riggio at create-net.org
Tue Mar 4 11:09:38 EST 2008
Eddie,
I don't know if it is really a problem. I use schedule_at
in order to schedule the timer at X. Then, in run_timer I do
something like this:
schedule_at(now + delay)
now let's assume that I change the system clock while click is
running moving it forward one hour.
Then if delay is 1 min run_timer is executed
60 times right after the clock change is committed.
Is this the expected behavior?
----- "Eddie Kohler" <kohler at cs.ucla.edu> wrote:
> Roberto,
>
> I don't know exactly what the "problem" is here, which behavior do you
> not like?
>
> The meaning of "schedule_after" is "schedule at X past the current
> time." The
> meaning of "scheudle_at" is "schedule at the moment the system clock
> says X."
> These methods are behaving correctly.
>
> Eddie
>
>
> Roberto Riggio wrote:
> > Hi,
> >
> > the problem is the following: if I use the schedule_at function
> > in order to reschedule a timer I get the timer scheduled several
> > times if i move the system clock forward.
> >
> > On the other hand if I use the schedule_after function this
> > does not occur and the timer is scheduled only one even if I move
> > the clock several years in the future.
> >
> > The problem is annoying because I'm using click over an embedded
> > platform that forget the system date at each reboot (the default
> date
> > is Jan 2000).
> >
--
--------------------------------------------------------
Roberto Riggio, PhD Student
CREATE-NET
Via alla Cascata 56/C
38100 Trento (Italy)
E-mail: roberto.riggio at create-net.org
HomePage: http://disi.unitn.it/~riggio/
Tel: +39.0461.314.960
Fax: +39.0461.314.972
--------------------------------------------------------
More information about the click
mailing list