etic

Start stopwatch timer for executables

Syntax

etic

Description

etic     starts a stopwatch timer. The function records the internal time at execution of the etic command. Display the elapsed time with the etoc function.

Code Generation

This function is supported for code generation. It is designed for desktop deployment of a mex (.mex[]) or executable (.exe) file. It can not be placed in a MATLAB Function block. For use in Simulink, use the Soft Real-Time block.

Example

Running a MATLAB Executable File (mex) in Soft Real-Time

First, run the function ScheduleEticMatlabExample which prints to the MATLAB Command Window every 0.5 seconds. This function uses etic and etoc to schedule the printing.

Then, run the script buildMatlabSoftRealTimeExample which generates a mex file from ScheduleEticMatlabExample. Since etic and etoc are supported for code generation, the generated mex file ScheduleMatlabExample_mex prints to the MATLAB Command Window every 0.5 seconds.

See Also

Soft Real-Time