Programming |
Executing a Timer Callback Function Multiple Times
The timer object supports three multiple-execution modes:
In many ways, these execution modes operate the same:
TasksToExecute
property specifies the number of times you want the timer to execute the timer callback function (TimerFcn
).
Period
property specifies the amount of time between executions of the timer callback function.
BusyMode
property specifies how the timer object handles queuing of the timer callback function when the previous execution of the callback function has not completed. See Handling Callback Function Queuing Conflicts for more information.
The execution modes differ only in where they start measuring the time period between executions. The following table describes these differences.
The following figure illustrates the difference between these modes. Note that the amount of time between executions (specified by the Period
property) remains the same. Only the point at which execution begins is different.
Differences Between Execution Modes
Timer Object Execution Modes | Handling Callback Function Queuing Conflicts |
© 1994-2005 The MathWorks, Inc.