Handbook
Glossary
restart-timer ( timer -- )
Timers
Prev:
start-timer ( timer -- )
Next:
stop-timer ( timer -- )
Vocabulary
timers
Inputs
timer
a
timer
Outputs
None
Word description
Starts or restarts a timer. Restarting a timer causes the a sleep of initial delay nanoseconds before looping. An timer's parameters may be modified and restarted with this word.
Definition
USING:
accessors
kernel
timers.private
;
IN:
timers
:
restart-timer
( timer -- )
dup
thread>>
[
dup
delay-nanos
>>next-nanos
[
thread>>
]
[
?interrupt
]
bi
]
[
start-timer
]
if
;