TibrvTimer::resetInterval()

Method

Declaration

TibrvStatus resetInterval(tibrv_f64 newInterval);

Purpose

Reset the interval of a timer event object.

Remarks

The timer begins counting the new interval immediately.

Parameter

Description

newInterval

The timer triggers its callback method at this new repeating interval (in seconds).

Timer Granularity

Express the timer interval (in seconds) as a 64-bit floating point number. This representation allows microsecond granularity for intervals up to approximately 146 years. The actual granularity of intervals depends on hardware and operating system constraints.

Limit of Effectiveness

This method can affect a timer only before or during its interval—but not after its interval has elapsed.

This method neither examines, changes nor removes an event that is already waiting in a queue for dispatch. If the next event for the timer object is already in the queue, then that event remains in the queue, representing the old interval. The change takes effect with the subsequent interval. (To circumvent this limitation, a program can destroy the old timer object and replace it with a new one.)