Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Events/Wren/events.wren
Normal file
17
Task/Events/Wren/events.wren
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import "scheduler" for Scheduler
|
||||
import "timer" for Timer
|
||||
|
||||
var a = 3
|
||||
|
||||
// add a task
|
||||
Scheduler.add {
|
||||
a = a * a
|
||||
}
|
||||
// add another task
|
||||
Scheduler.add {
|
||||
a = a + 1
|
||||
}
|
||||
|
||||
System.print(a) // still 3
|
||||
Timer.sleep(3000) // wait 3 seconds
|
||||
System.print(a) // now 3 * 3 + 1 = 10
|
||||
Loading…
Add table
Add a link
Reference in a new issue