[ ECLiPSe Operating System built-in.|Group Index| Full Index]

get_timer(+Timer, ?Interval)

Succeed if the specified Timer is running and sends signals in intervals of Interval seconds.

+Timer
One of the atoms real, virtual or profile.
?Interval
A variable or a real number.

Description

Used to examine the states of the 3 system interval timers. When the specified timer is switched off, the predicate fails. Otherwise, the Interval argument is unified with a real number indicating the timer interval in seconds. The names of the timers are real, virtual and profile.

Fail Conditions

Fails if the timer is not running.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Timer is not instantiated.
(5) Type error
Timer is not an atom.
(6) Range error
Timer is an atom not naming a timer.
(5) Type error
Interval neither a variable nor a real number.

Examples


[eclipse 1]: set_timer(virtual, 9), get_timer(virtual, I).

I = 9.0
yes.
[eclipse 2]: set_timer(virtual, 0), get_timer(virtual, I).

no (more) solution.


See Also

alarm / 1, current_interrupt / 2, sleep / 1, set_interrupt_handler / 2, set_timer / 2