Programming |
Using a MATLAB Timer Object
To use a timer, perform these steps:
timer
function to create a timer object. See Creating Timer Objects for more information.
start
or startat
function. See Starting and Stopping Timers for more information.
Note
The specified execution time and the actual execution of a timer can vary because timer objects work in the MATLAB single-threaded execution environment. The length of this time lag is dependent on what other processing MATLAB is performing. To force the execution of the callback functions in the event queue, include a call to the drawnow function in your code. The drawnow function flushes the event queue. For more information about callback processing, see The Event Queue in the MATLAB Programming GUIs documentation.
|
Scheduling Program Execution with Timers | Example: Displaying a Message |
© 1994-2005 The MathWorks, Inc.