yev_start_timer_event()

yev_start_timer_event()#

yev_start_timer_event() starts a timer event, creating the handler file descriptor if it does not exist.

Prototype

int yev_start_timer_event(
    yev_event_h yev_event,
    time_t      timeout_ms,
    BOOL        periodic
);

Parameters

Key

Type

Description

yev_event

yev_event_h

Handle to the event that will be started as a timer.

timeout_ms

time_t

Timeout in milliseconds. A value of timeout_ms <= 0 is equivalent to calling yev_stop_event().

periodic

BOOL

If TRUE, the timer will be periodic; otherwise, it will be a one-shot timer.


Return Value

Returns 0 on success, or -1 on failure.

Notes

To start a timer event, use yev_start_timer_event() instead of yev_start_event(). If the timer is in the IDLE state, it can be reused. If it is STOPPED, a new timer event must be created.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples