forked from Mirror/wren
Add docs for Timer class (#903)
Another class that has remained undocumented for a long time.
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
^title Timer Class
|
||||
|
||||
**TODO**
|
||||
## Static Method
|
||||
|
||||
## Methods
|
||||
### Timer.**sleep**(milliseconds)
|
||||
|
||||
Suspends the current fiber for the given number of milliseconds. It is a runtime error if this is not a non-negative number.
|
||||
|
||||
This method is often used in conjunction with the Scheduler class which runs any scheduled tasks in separate fibers whilst the current fiber is sleeping.
|
||||
|
||||
Note that this method also suspends the System.clock method which will not give the correct running time for a program as a result.
|
||||
|
||||
**TODO**
|
||||
|
||||
Reference in New Issue
Block a user