11.3.13.5. Repeated Scheduling
If you schedule a Function that returns a number, the interpreter will schedule the Function to re-run in that many beats.
This will print "5" every five seconds, until you press [Esc] to stop execution.
SystemClock.sched( 5, { 5.postln; } );
To avoid this, you can end your Function with
nil
, which has been done sometimes through this guide.
SystemClock.sched( 5, { 5.postln; nil; } );
This will print
5
in five seconds, and then stop.