TimerTicksPerSecond - Get and set number of timer ticks per second - MATLAB (original) (raw)

Main Content

Get and set number of timer ticks per second

Syntax

Description

[timerTicksPerSecVal](#mw%5Fa949f8ba-5613-4599-9c90-3ece85f4299f) = [myExecutionProfile](#mw%5Fb09722e3-6d0f-48d4-a791-602b7ffb8a59).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

Examples

collapse all

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

timerTicksPerSecVal = myExecutionProfile.TimerTicksPerSecond;

To set the number of timer ticks per second, set theTimerTicksPerSecond property value in themyExecutionProfile 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