duration
Elapsed time since condition is true
Description
elapsed_time = duration(condition)true. The condition is a logical expression. The
          elapsed_time is reset when the test step is re-entered or when the
        condition is no longer true.
elapsed_time = duration(
        returns the elapsed time in condition,timeunits)timeunits. 
Valid time units are:
- sec — seconds 
- msec — milliseconds 
- usec — microseconds 
Examples
Tips
- durationstatements can be used in the Test Sequence and Test Assessment blocks and in Stateflow® charts.
- In Stateflow charts, - durationstatements can be associated only with a single state. You cannot use a- durationon a transition that has more than one source state connected using a junction.
Version History
Introduced in R2015a