Skip to Main Content Skip to Search
Product Documentation

getTimes - Get execution times in seconds for profiled section of code

Syntax

ExecutionTimes = NthSectionProfile.getTimes

Description

ExecutionTimes = NthSectionProfile.getTimes returns a vector of execution times, measured in seconds, for the profiled section of code. Each element of the array contains the elapsed time (in seconds) for the profiled section.

The software generates array elements from the timer tick readings, by dividing the readings by the number of timer ticks per second. If you do not specify the number of timer ticks per second, then the method returns an empty array.

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 seconds, for profiled section of code

See Also

display | getMaxTicks | getName | getNumCalls | getNumSectionProfiles | getSampleOffset | getSamplePeriod | getSectionNumber | getSectionProfile | getTicks | getTimerTicksPerSecond | 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