Main Content

RT.Timer

Represent timer in real-time kernel

Since R2023b

Description

An RT.Timer object represents a timer in the real-time kernel. Use get.Property and set.Property to view and modify object property values.

Creation

Use the createTimer function to create a timer in the real-time kernel.

Properties

expand all

The Parent property provides the name of the kernel object that is the parent of the timer.

The Running property provides the timer run status.

The Priority property provides the timer priority level.

The Period property provides the time period in seconds.

The Ticks property provides the count of timer ticks that have occurred.

The TimeToTick property provides the time in seconds until the next timer tick.

Object Functions

createTimerCreate timer in real-time kernel

Examples

collapse all

This example shows how to get timer property values for the RT.Timer object.

Create a variable that represents the timer, then get the Running property value.

openExample('sldrtex_counter');
myTimer = RT.Timer;
myRunStatus = SLDRT.run('sldrtex_counter',Wait="off");
get(myTimer,'Running')
ans =

     []

Version History

Introduced in R2023b