about timer_create() function

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

“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