about timer_create() function

bridged with qdn.public.devtools
Post Reply
John Zou

about timer_create() function

Post by John Zou » Fri Nov 07, 2003 3:13 am

Hi all,

I want to use a timer in my application. In the first part, I use a timer of
period 62.5ms, then I use MsgReceive() to wait for the pulse on a channel.
After some 100 times I need to change the period to 100ms. Do I need to
timer_delete and then timer_create again? Or, alternatively, can I just
timer_settime again to set the period different? Moreover, if I use create a
new timer, do I have to create a new channel also and wait for the event on
this event, just in order not to confuse with the previously existed timer
event?

Thanks!

John

Mario Charest

Re: about timer_create() function

Post by Mario Charest » Fri Nov 07, 2003 12:52 pm

"John Zou" <yjzou@sina.com> wrote in message
news:bof1j5$rti$1@inn.qnx.com...
Hi all,

I want to use a timer in my application. In the first part, I use a timer
of
period 62.5ms, then I use MsgReceive() to wait for the pulse on a channel.
After some 100 times I need to change the period to 100ms. Do I need to
timer_delete and then timer_create again? Or, alternatively, can I just
timer_settime again to set the period different?
timer_settime will do it.
Moreover, if I use create a
new timer, do I have to create a new channel also and wait for the event
on
this event, just in order not to confuse with the previously existed timer
event?
The pulse (assuming you used a pulse) id will tell you what timer woke the
program.
Thanks!

John

Post Reply

Return to “qdn.public.devtools”