MATLAB: Does a timer stil run its callback function when pause is called from outside

MATLABpausetimer

Hi,
If i set a timer to have an execution period of 1 second, and I do something like this:
start(timerObject)
pause(60)
stop(timerObject)
Will the timer's callback function execute during the 60 second pause?

Best Answer

Simply try it:
TimerH = timer('TimerFcn', 'disp(clock)', 'Period', 1, ...
'ExecutionMode', 'fixedSpacing', 'TasksToExecute', 10);
start(TimerH);
pause(20);
stop(TimerH);
You see the current time appearing every second even during the pause.