[Click] click Digest, Vol 35, Issue 4

Bart Braem bart.braem at ua.ac.be
Mon May 8 03:05:15 EDT 2006


On Saturday 06 May 2006 18:13, Ges wrote:
> The Click timer I am using is used along with a Task. i.e. my timer is
> created for a task: _to_usrp_timer(&_tousrp_task).
>
> I am scheduling the timer and the task alternatively. This is how it works:
>
> I first schedule the timer in the initialization phase of the element.
> _usrp_timer.schedule_now() This results in the call to the run_task()
> function of the element. In run_task() I schedule the task twice -
> _usrp_task.fast_reschedule() which results in another call to run_task(),
> and again _usrp_task.fast_rechedule() is called. After run_task() runs this
> time, I schedule the timer to run after X secs.
>
> Basically, after 2 fast_reschedule of the task(), I schedule the timer to
> run after X secs. I am doing this on both the machines. All I vary is the
> interval X so that the transmissions from both do not happen at the same
> time.
>
> Does this alternating use confuse the timers? I am not sure, so I thought I
> should clarify.

This does not confuse timers, it works properly. Did you try to debug using 
output of when you are scheduling for which moment?

Bart
-- 
Bart Braem
PATS research group
Dept. of Mathematics and Computer Sciences
University of Antwerp
G2.36, Building G
Middelheimlaan 1
2020 Antwerpen, Belgium
Phone: +32 (0)3 265.35.19.
Fax: +32 (0)3 265.37.77.
Web: www.pats.ua.ac.be
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20060508/e9458e94/attachment.pgp


More information about the click mailing list