Main Content

t

Elapsed time of simulation

Description

example

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

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