REBOL: How to do another task while waiting an alarm to trigger ?
- by Rebol Tutorial
So I have created an alarm function:
alarm: func[seconds message [string! unset!]][
wav: load %attention.wav
sound-port: open sound://
wait seconds do [
insert sound-port wav
wait sound-port
close sound-port
if (value? 'message) [
print message
]
]
]
which works like this:
alarm 30 "Will trigger in 30 seconds"
Now how can I for example show a timer which increments while waiting for the alarm since Rebol doesn't support thread ?