[REBOL] Re: A question in time saves... Clouds???
From: cyphre:volny:cz at: 5-Jun-2001 14:00
Hello,
Maybe this would help you:
times: [13:59 14:00]
action: [print "bang!"]
wait-loop: does [
dispatch [1 [
if equal? now/time first times [
times: next times
if tail? times [times: head times]
do action
]
wait-loop
]]]
wait-loop
or another version with unique actions for each event:
times: [12:54 [print "bing!"] 12:58 [print "bang!"] 13:00 [print "bong!"]]
wait-loop: does [
dispatch [1 [
if equal? now/time first times [
do next times
times: skip times 2
if tail? times [times: head times]
]
wait-loop
]]]
wait-loop
have fun,
Cyphre