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 Elapsed Time Counter
Generate code for an elpased time counter.
- Optimize Memory Usage for Time Counters
Optimize memory that the code generator allocates for an elapsed time counter.
- Specify Clock Resolution Used by Target Environment Clock
This example shows how to improve entry-point code that is generated for model functions that include blocks that request absolute or elapsed time values.
- Absolute Time Limitations
Restrictions that apply to absolute time. A list of blocks that depend on absolute time.