Main Content


Represent timer in real-time kernel

Since R2023b


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.


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


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


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.

myTimer = RT.Timer;
myRunStatus ='sldrtex_counter',Wait="off");
ans =


Version History

Introduced in R2023b