Main Content


Absolute and elapsed timers

System target files that support the real-time model (rtModel) data structure provide efficient time computation services for blocks that request absolute or elapsed time. Absolute time is the time from the start of program execution to the present time. Elapsed time is the time elapses between two trigger events. See Absolute and Elapsed Time Computation for more information about how the code generator uses timers.


Absolute and Elapsed Time Computation

Handle absolute and elapsed time specified for blocks in a model with the code generator.

Access Timers Programmatically

Gain access to timers to use in S-functions for simulation and code generation.

Generate Code for an Elapsed Time Counter

Generate code from a model that uses and maintains an elapsed timer.

Optimize Memory Usage for Time Counters

Optimize memory that the code generator allocates for elapsed time or absolute time.

Absolute Time Limitations

Restrictions that apply to absolute time. A list of blocks that depend on absolute time.