Go to the source code of this file.
◆ __xroad_timer_dtor__
| #define __xroad_timer_dtor__ __dtor__(xroad_timer_destructor) |
◆ xroad_timer_start
| #define xroad_timer_start |
( |
|
timer, |
|
|
|
interval |
|
) |
| |
Value: _Generic((interval), \
)(timer, interval)
Definition: xroad_time.h:26
xroad_errno_t xroad_timer_start_tm(xroad_timer_t *tm, xroad_time_t time)
xroad_errno_t xroad_timer_start_int(xroad_timer_t *tm, uint64_t interval)
once fires timer in interval time
- Parameters
-
| [in] | tm | - pointer to the timer instance |
| [in] | interval,time | - timer interval in microseconds or exact time (xroad_time_t) |
- Returns
- XROAD_OK if success otherwise XROAD_FAILED
◆ xroad_timer_start_repeat
| #define xroad_timer_start_repeat |
( |
|
timer, |
|
|
|
start, |
|
|
|
repeat |
|
) |
| |
Value: _Generic((start), \
default: xroad_timer_start_repeat_int \
)(timer, start, repeat)
fires timer after start interval and repeat in repeat interval
- Parameters
-
| [in] | tm | - pointer to the timer instance |
| [in] | start | - timer interval in microseconds when it starts first time or exact time |
| [in] | repeat | - timer repeat interval in microseconds |
- Returns
- XROAD_OK if success otherwise XROAD_FAILED
◆ xroad_timer_create()
create new timer instance
- Parameters
-
| [in] | name | - timer name. optional |
| [in] | cb | - callback function |
- Returns
- pointer to new instance, NULL - error
◆ xroad_timer_destroy()
destroy timer instance
- Parameters
-
| [in] | tm | - pointer to the timer instance. If NULL, nothing happened |
◆ xroad_timer_get_ctx()
returns timer context from callback
- Parameters
-
- Returns
- context from cback
◆ xroad_timer_get_name()
get timer name in format name(sock_id)
- Parameters
-
- Returns
- timer name
◆ xroad_timer_is_armed()
returns true if timer is armed
- Parameters
-
| [in] | tm | - pointer to the timer instance |
◆ xroad_timer_repeat()
| xroad_errno_t xroad_timer_repeat |
( |
xroad_timer_t * |
tm, |
|
|
uint64_t |
interval |
|
) |
| |
repeatedly fires timer in interval time
- Parameters
-
| [in] | tm | - pointer to the timer instance |
| [in] | interval | - timer interval in microseconds |
- Returns
- XROAD_OK if success otherwise XROAD_FAILED
◆ xroad_timer_stop()
stop timer
- Parameters
-
| [in] | tm | - pointer to the timer instance |