start, timer.start
Start a timer object.
📝Syntax
start(t)
📥Input Arguments
Parameter Description
t Timer object or timer object array.
📄Description

start starts the timer using its StartDelay, ExecutionMode, Period, and TasksToExecute properties. The timer must have a nonempty TimerFcn.

start returns immediately after the timer is scheduled. Use wait when the current command sequence must block until the timer finishes.

💡Examples
Start a single-shot timer.
t = timer('StartDelay', 0.1, ...
  'TimerFcn', @(src, event) disp('started and fired'));
start(t);
wait(t);
delete(t);
Start a repeated timer.
t = timer('ExecutionMode', 'fixedSpacing', ...
  'Period', 0.05, ...
  'TasksToExecute', 3, ...
  'TimerFcn', @(src, event) disp('tick'));
start(t);
wait(t);
delete(t);
🔗See Also
timerstartatstopwait
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub