13.5.3.3 APP_TIMER_SetTimer
C
uint16_t APP_TIMER_SetTimer(uint8_t timerId, uint32_t timeout, bool isPeriodicTimer);Description
The function is used to set and start a timer.
Parameters
| Parameter | Description | 
|---|---|
| [in] timerId | Timer ID. See APP_TIMER_TimerId_T. | 
| [in] timeout | Timeout value (unit: ms) | 
| [in] isPeriodicTimer | Set as true to let the timer expire repeatedly with a frequency set by the timeout parameter. Set as false to let the timer be a one-shot timer. | 
Return values
| Return value | Description | 
|---|---|
| APP_RES_SUCCESS | Set and start a timer successfully. | 
| APP_RES_FAIL | Failed to start the timer. | 
| APP_RES_OOM | No available memory. | 
| APP_RES_NO_RESOURCE | Failed to create a new timer. | 
