Events: Difference between revisions

added Easylang
m (syntax highlighting fixup automation)
(added Easylang)
 
(2 intermediate revisions by 2 users not shown)
Line 342:
println("[1] Waiting 1 second...")
}</syntaxhighlight>
 
=={{header|EasyLang}}==
 
[https://easylang.dev/show/#cod=y89TKMnMTS3iUlBQyM0vS1UoSsxLyc9NU9BSMDQwQOWB1CRnFiXnpCoYgdhgjQqGXHpc+XlAzaXFqfEp+eV5cKMgQhVQuhJFux4XRLcBFwA= Run it]
 
<syntaxhighlight>
on timer
move randomf * 100 randomf * 100
circle 2
timer 1
.
on mouse_down
move mouse_x mouse_y
circle 2
.
timer 0
</syntaxhighlight>
 
=={{header|Elixir}}==
Line 451 ⟶ 468:
</pre>
 
 
=={{header|FutureBasic}}==
Event timer fires every tenth of a second
<syntaxhighlight lang="futurebasic">
timerbegin, 0.1, YES
cls : printf @"%@", time(@"h:mm:ss a zzz")
timerend
 
HandleEvents
</syntaxhighlight>
{{output}}
<pre>
4:44:36 PM EDT
</pre>
 
=={{header|Gambas}}==
Line 1,242 ⟶ 1,273:
 
The tasks to be executed are added to a list by the Scheduler class. The Timer.sleep method suspends the current fiber and signals the scheduler (by calling a private method) to execute the tasks one by one in their own fibers - in Wren only one fiber can execute at a time. The task results are then available to the main fiber on its resumption after Timer.sleep has completed.
<syntaxhighlight lang="ecmascriptwren">import "scheduler" for Scheduler
import "timer" for Timer
 
Line 1,265 ⟶ 1,296:
10
</pre>
 
 
=={{header|Yabasic}}==
2,063

edits