Handbook
Glossary
start-timer ( timer -- )
Timers
Prev:
<timer> ( quot delay-duration/f interval-duration/f -- timer )
Next:
restart-timer ( timer -- )
Vocabulary
timers
Inputs
timer
a
timer
Outputs
None
Word description
Starts a timer.
Definition
USING:
accessors
kernel
threads
timers.private
;
IN:
timers
:
start-timer
( timer -- )
dup
thread>>
[
timer-already-started
]
when
dup
delay-nanos
>>next-nanos
dup
[
timer-loop
]
curry
"Timer"
<thread>
[
>>thread
drop
]
[
(spawn)
]
bi
;