TimerHandleT

Members are:

void TimerEvtStart(afb_api_t api, TimerHandleT timerHandle, timerCallbackT callback, void context)

Start a timer which invokes the callback when the delay expires for count times.

void TimerEvtStop(TimerHandleT *timerHandle)

Manually stop the timer's run. If the count isn't finished then it will end the timer and no other runs will occur.

uint64_t LockWait(afb_api_t api, uint64_t utimeout)

It is function acting like a non-blocking sleep for an API. It lets the main API event loop runs while you are waiting and will unlock at the first received event and returns the remaining time to wait if an event occurs or 0 if no events occured and timeout hits. Then you have to manually ensure that once an event has been received that it was the one you are waiting for and if not launch again the wait with the remaining time returned.

Returns the remaining time in microsecond to wait if an event occurs or 0 if no events occured and timeout hits.