计时器
绝对时间计时器和已用时间计时器
支持实时模型 (rtModel) 数据结构体的系统目标文件为需要绝对时间或已用时间的模块提供高效的计时服务。绝对时间是指从程序开始执行到现在的时间。已用时间是指两次触发事件之间经过的时间。有关代码生成器如何使用计时器的详细信息,请参阅Absolute and Elapsed Time Computation。
主题
- 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.
- 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.