TibrvTimer()
Constructor
Declaration
TibrvTimer
(
TibrvQueue queue,
TibrvTimerCallback callback,
double interval,
java.lang.Object closure)
throws TibrvException
Purpose
Remarks
All timers are repeating timers. To simulate a once-only timer, code the callback method to destroy the timer.
Parameter |
Description |
|
At each time interval, place the event on this event queue. |
|
On dispatch, process the event with this interface implementation. |
|
The timer triggers its callback method at this repeating interval (in seconds). |
|
Store this closure data in the event object. |
Timer Granularity
Express the timer interval (in seconds) as a double (64-bit floating point number). This representation allows microsecond granularity for intervals for over 100 years. The actual granularity of intervals depends on Java implementation constraints, as well as hardware and operating system constraints.
The JNI implementation supports fine-resolution timers through the underlying C layer. Most releases of the JVM limit the Java implementation to 10 millisecond resolution.