Julia: Difference between revisions
No edit summary |
No edit summary |
||
Line 38: | Line 38: | ||
===Animation Loop=== | ===Animation Loop=== | ||
You can use <code>Timer(callback, delay, interval)</code>. This is similar to SetInterval in JavaScript. | 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>. | |||
<syntaxhighlight lang="julia"> | <syntaxhighlight lang="julia"> | ||
animate = Timer(function(t) | animate = Timer(function(t) |