timer
Create a timer that calls a given function at specified intervals.
timedcaller=timer(dt,timerfunc)
Inputs
dt The interval (in milliseconds) between successive calls.
timerfunc The function (without any inputs or outputs) to be called.
Outputs
timedcaller The timer.


Description
The call timedcaller.start() should be made to start the timer, and timedcaller.stop() to stop it.


Example
>>//In the following example the plot of a vibrating membrane is displayed.
>>function createSurface(x,y,z)
>	t=0
>	zmin=min(min(z))
>	zmax=max(max(z))
>	xmin=min(min(x))
>	xmax=max(max(x))
>	ymin=min(min(y))
>	ymax=max(max(y))
>	axisarg=[xmin-.1 xmax+.1 ymin-.1 ymax+.1 zmin-.1 zmax+.1];
>	return @drawfunction
>	function drawfunction()
>		surf(x,y,sin(2pi*t)*z)
>		axis(axisarg)
>		t=t+.05
>	end
>end
>>x=[0:.05:1]
>>z=sin(pi*x')*cos(2*pi*x)
>>w=timer(200,createSurface(x,x,z))
>>w.start()