AWS IoT Device SDK C: Platform
Platform portability layer
Return to main page ↑
IotClock_TimerCreate

Create a new timer.

bool IotClock_TimerCreate( IotTimer_t * pNewTimer,
IotThreadRoutine_t expirationRoutine,
void * pArgument );

This function creates a new, unarmed timer. It must be called on an uninitialized IotTimer_t. This function must not be called on an already-initialized IotTimer_t.

Parameters
[out]pNewTimerSet to a new timer handle on success.
[in]expirationRoutineThe function to run when this timer expires. This function should be called in its own detached thread.
[in]pArgumentThe argument to pass to expirationRoutine.
Returns
true if the timer is successfully created; false otherwise.
See also
IotClock_TimerDestroy, IotClock_TimerArm