Main Content

Execution Time

R2026b

Output total execution time in Run in Kernel mode or Priority mode

  • Execution Time block

Libraries:
Simulink Desktop Real-Time / Target Profiling

Description

The Execution Time block outputs the execution time in Run in Kernel mode or Priority mode.

In Connected IO mode, this block does not perform any action. It outputs zeros.

Examples

Ports

Output

expand all

Presents the total execution time as of the previous sample time.

Presents the task execution times for individual sample rates in a multitasking model as of the previous sample time.

Dependency

When you select Measure task execution times, this port is visible.

Parameters

expand all

Makes visible the port Task Exec Time, which presents the task execution times for individual sample rates in a multitasking model as of the previous sample time.

Programmatic Use

Block Parameter: ShowTaskTimes

Programmatic Use: Add Block

To add the block programmatically, use the add_block function with one of these library block paths as the source.

"sldrtlib/Target Profiling/Execution Time"

Example: add_block("sldrtlib/Target Profiling/Execution Time","myModel/myBlock",MakeNameUnique="on")

Version History

Introduced in R2017a

expand all