samer@2: % timer_wait - Wait for timer to stop running samer@0: % samer@2: % timer_wait :: timer => void. samer@2: % timer_wait :: timer, nonneg ~'time quantum for waiting' => void. samer@0: % samer@0: % If no wait quantum is supplied, the default is 50ms. samer@0: samer@2: function timer_wait(T,dt) samer@0: samer@0: if nargin<2, dt=0.05; end samer@0: while isvalid(T) && strcmp(T.Running,'on') samer@0: pause(dt); samer@0: end samer@0: end