Timer manipulation functions.
More...
Timer manipulation functions.
Timer manipulation functions
◆ nugu_timer_new()
NUGU_API NuguTimer* nugu_timer_new |
( |
long |
interval | ) |
|
Create new timer object.
- Parameters
-
[in] | interval | interval seconds |
- Returns
- timer object
◆ nugu_timer_delete()
NUGU_API void nugu_timer_delete |
( |
NuguTimer * |
timer | ) |
|
Destroy the timer object.
- Parameters
-
◆ nugu_timer_set_interval()
NUGU_API void nugu_timer_set_interval |
( |
NuguTimer * |
timer, |
|
|
long |
interval |
|
) |
| |
◆ nugu_timer_get_interval()
NUGU_API long nugu_timer_get_interval |
( |
NuguTimer * |
timer | ) |
|
◆ nugu_timer_set_singleshot()
NUGU_API void nugu_timer_set_singleshot |
( |
NuguTimer * |
timer, |
|
|
int |
singleshot |
|
) |
| |
Set timer running single shot.
- Parameters
-
[in] | timer | timer object |
[in] | singleshot | By setting the singleshot to 1, you can trigger the timer only once. The default value of singleshot is 0, and the timer runs repeatedly. |
- See also
- nugu_timer_get_singleshot()
◆ nugu_timer_get_singleshot()
NUGU_API int nugu_timer_get_singleshot |
( |
NuguTimer * |
timer | ) |
|
◆ nugu_timer_start()
NUGU_API void nugu_timer_start |
( |
NuguTimer * |
timer | ) |
|
◆ nugu_timer_stop()
NUGU_API void nugu_timer_stop |
( |
NuguTimer * |
timer | ) |
|
◆ nugu_timer_set_callback()
Set timeout callback.
- Parameters
-
[in] | timer | timer object |
[in] | callback | callback function |
[in] | userdata | data to pass to the user callback |