TimerFD.set

Sets next expiration time of interval timer.

Setting first_s or first_ms to a non-zero value arms the timer. Setting both to zero disarms the timer. If both interval_s and interval_ms are zero, the timer expires just once, at the time specified by first_s and first_ms.

  1. itimerspec set(timespec first, timespec interval)
  2. itimerspec set(time_t first_s, uint first_ms, time_t interval_s, uint interval_ms)
    class TimerFD
    itimerspec
    set
    (
    time_t first_s
    ,,
    time_t interval_s = 0
    ,
    uint interval_ms = 0
    )

Parameters

first_s time_t

Specifies the number of seconds of the initial expiration of the timer.

first_ms uint

Specifies an amount of milliseconds that will be added to first_s.

interval_s time_t

Specifies the number of seconds of the period for repeated timer expirations after the initial expiration.

interval_ms uint

Specifies an amount of milliseconds that will be added to interval_ms.

Return Value

Type: itimerspec

the previous expiration time as time().

Throws

upon failure to set the time

Meta