Main Content

TimerTicksPerSecond

Get and set number of timer ticks per second (MATLAB code generation)

Description

timerTicksPerSecVal = myExecutionProfile.TimerTicksPerSecond returns the number of timer ticks per second. For example, if the timer runs at 1 MHz, then the number of ticks per second is 106.

You can calculate the execution time in seconds using the formula ExecutionTimeInSecs=ExecutionTimeInTicks/TimerTicksPerSecond.

example

myExecutionProfile.TimerTicksPerSecond = timerTicksPerSecVal sets the number of timer ticks per second. Use this method if the target connectivity configuration does not specify this value.

example

Examples

collapse all

To get the number of timer ticks per second, get the TimerTicksPerSecond property value from the myExecutionProfile workspace variable.

timerTicksPerSecVal = myExecutionProfile.TimerTicksPerSecond;

To set the number of timer ticks per second, set the TimerTicksPerSecond property value in the myExecutionProfile workspace variable.

myExecutionProfile.TimerTicksPerSecond = timerTicksPerSecVal;

Input Arguments

collapse all

The myExecutionProfile is a workspace variable that contains the execution-time profile of the code generated from your MATLAB® function.

Number of timer ticks per second

Example: timerTicksPerSecVal

Output Arguments

collapse all

Number of timer ticks per second

Version History

Introduced in R2012b