Google | Online | Timer Callback
Anonymous User
859

Implement callbacks which can be called after X time, assuming that there is only one timer available in the system. Once timer is started, it can be cancelled and then again started if required.
API

register_callback(void (*FPTR)(void *), void *arg, time _t delay) 

Above API can be called by any of the thread, sae thread call above API multiple time with same argument. Implemnet above.

timer_interrupt() 

Above API will be called when timer expires, on expiry of timer, all possible API's should be called which timer expired. Implement timer_interrupt() as well .

Comments (3)