The site Rwait is a relative timer. It takes as a nonnegative integer argument
a number of milliseconds to wait. It waits for approximately that amount of time,
and then responds with a signal.
The site Rtime is a program clock.
When called, it returns the number of milliseconds that have elapsed since
the program began executing.
The site Rclock creates new clock instances.
When called, it returns a new clock, with two members: wait and time.
The wait member behaves exactly like Rwait.
The time member returns the number of milliseconds that have passed since the clock was created.
{- Print "red", wait for 3 seconds (3000 ms), and then print "green" -} Println("red") >> Rwait(3000) >> Println("green") >> stop {- OUTPUT: red green -}
include "search.inc" {- Publish the result of a Google search. If it takes more than 5 seconds, time out. -} result <result< ( Google("impatience") | Rwait(5000) >> "Search timed out.")
Related Reference Topics
Related Tutorial Sections