///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// 5. Scheduling
// Decide when to run your functions
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// in one of the above task/function we decided which parameters of our function are going to be run and chose those within a task, according to a wait value.  This is a rudimentary form of scheduling.

(
var myTime = 2.0;

SystemClock.schedAbs( (thisThread.seconds + myTime),
	{
	(
		"your functions go in here".postln;
	);
	}); // end clock
)

///////////////////////////////////////////////////////////////////////////
// More complex...

(
var wholeTime = 0.0;

wholeTime = thisThread.seconds + 0.0;

SystemClock.schedAbs( wholeTime,
	{
	(
		"start".postln;
	);
	}); // end clock
	
wholeTime = thisThread.seconds + 2.0;

SystemClock.schedAbs( wholeTime,
	{
	(
		"Two seconds".postln;
	);
	}); // end clock
	
wholeTime = thisThread.seconds + 6.0;
// or
// wholeTime = wholeTime + 4.0;

SystemClock.schedAbs( wholeTime,
	{
	(
		"Six seconds from the start, four seconds later".postln;
	);
	}); // end clock
)