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

Examples

Obtain Simulation Time in Milliseconds

t(msec)

Tips

Elapsed simulation time ( t) statements can be used in the Test Sequence and Test Assessment blocks and in Stateflow® charts.

Introduced in R2015a