Skip to Main Content Skip to Search
Product Documentation

getTicks - Get execution times in timer ticks for profiled section of code

Syntax

[ExecutionTimes SelfExecutionTimes] = NthSectionProfile.getTicks

Description

[ExecutionTimes SelfExecutionTimes] = NthSectionProfile.getTicks returns two vectors of execution times, measured in timer ticks, for the profiled section of code. Each element of ExecutionTimes contains the difference between the timer reading at the start and the end of the section, while each element of SelfExecutionTimes contains the section time excluding the time spent in child functions. The data type of the arrays is the same as the data type of the timer used on the target, which allows you to infer the maximum range of the timer measurements.

NthSectionProfile is an rtw.pil.ExecutionProfileSection object generated by the rtw.pil.ExecutionProfile method getSectionProfile.

If you set the parameter CodeProfilingSaveOptions to 'SummaryOnly' (that is, set Simulation > Configuration Parameters > Code Generation > SIL and PIL Verification > Save options to Summary data only), then NthSectionProfile.getTicks returns an empty array.

Output Arguments

ExecutionTimes

Vector of execution times, in timer ticks, for profiled section of code

SelfExecutionTimes

Vector of execution times, in timer ticks, for profiled section of code but excluding time spent in child functions

See Also

display | getMaxTicks | getName | getNumCalls | getNumSectionProfiles | getSampleOffset | getSamplePeriod | getSectionNumber | getSectionProfile | getTimerTicksPerSecond | getTimes | getTotalSelfTicks | getTotalTicks | report | setTimerTicksPerSecond

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS