Julia: Difference between revisions

63 bytes added ,  10 September 2019
no edit summary
No edit summary
No edit summary
Line 39: Line 39:
===Animation Loop===
===Animation Loop===
You can use [https://docs.julialang.org/en/v1/base/base/#Base.Timer-Tuple{Function,Real} <code>Timer(callback, delay, interval)</code>]. This is similar to SetInterval in JavaScript.<br>
You can use [https://docs.julialang.org/en/v1/base/base/#Base.Timer-Tuple{Function,Real} <code>Timer(callback, delay, interval)</code>]. This is similar to SetInterval in JavaScript.<br>
End the loop with <code>close(animate)</code>.
End the loop with [https://docs.julialang.org/en/v1/base/io-network/#Base.close <code>close(animate)</code>].
<syntaxhighlight lang="julia">
<syntaxhighlight lang="julia">
animate = Timer(function(t)
animate = Timer(function(t)