Main Content

TimerTicksPerSecond

Get and set number of timer ticks per second

Description

example

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 Create PIL Target Connectivity Configuration for Simulink does not specify this value.

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

myExecutionProfile is a workspace variable generated by a simulation.

Example: myExecutionProfile

Number of timer ticks per second

Example: timerTicksPerSecVal

Output Arguments

collapse all

Number of timer ticks per second

Version History

Introduced in R2012b