annotate sched/timer_wait.m @ 0:672052bd81f8

Initial partial import.
author samer
date Wed, 19 Dec 2012 22:38:28 +0000
parents
children 7357e1dc2ad6
rev   line source
samer@0 1 % waitfortimer - Wait for timer to stop running
samer@0 2 %
samer@0 3 % waitfortimer :: timer -> action unit.
samer@0 4 % waitfortimer :: timer, nonneg ~'time quantum for waiting' -> action unit.
samer@0 5 %
samer@0 6 % If no wait quantum is supplied, the default is 50ms.
samer@0 7
samer@0 8 function waittimer(T,dt)
samer@0 9
samer@0 10 if nargin<2, dt=0.05; end
samer@0 11 while isvalid(T) && strcmp(T.Running,'on')
samer@0 12 pause(dt);
samer@0 13 end
samer@0 14 end