Timer with varying tick

Hello everyone,

Is it possible to have a timer which calls various other events which are also timed, then
calls again once those events are finished and so on?

So it would look a bit like this:

var t = new Timer(t = how long it takes to do the stuff in the_function, x);

function the_function(){
//draws varying number of items to screen
}

I can’t seem to work out how you would do this, if it’s possible.

Any help or useful pointers would be greatly appreciated.

All the best

M