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