amit kr
amit kr

Reputation: 137

Linux Timers in C

I am working on some Linux applications that uses timers.I need to change the timer interval during runtime.So is there any API that could detect whether any previous timer is running or not.My idea is like i will detect any previous running timer and will delete it and then will re-create the timer with new time value.

I am using timer_create(),timer_settime() for timer creation and timer starting.

Thanks&Regards Amit Kumar

Upvotes: 0

Views: 162

Answers (1)

Sush
Sush

Reputation: 1229

From the man page:

(If the timer was already armed, then the previous settings are overwritten.)

Seems like the function already does what you are looking for.

Upvotes: 2

Related Questions