Main Content

t

Elapsed time of simulation

Description

t(timeunits) returns the simulation time in timeunits. If you omit timeunits, the elapsed time defaults to seconds. t is an alias for getSimulationTime and both are valid.

Valid time units are:

  • sec — seconds

  • msec — milliseconds

  • usec — microseconds

example

Examples

expand all

t(msec)

Tips

Elapsed simulation time ( t) statements can be used in the Test Sequence and Test Assessment blocks and in Stateflow® charts. However, you cannot specify the timeunits input in Stateflow charts.

Version History

Introduced in R2015a