Hauptinhalt

before

Elapsed time until specified time in test step

Description

before(n,timeunits) returns true until the amount of time (n) in timeunits has elapsed since the beginning of the current test step. You must include the timeunits.

Valid time units are:

  • sec — seconds

  • msec — milliseconds

  • usec — microseconds

Examples

expand all

Specify 20 seconds as the time that has elapsed since the beginning of the test step. This statement returns true until 20 seconds has passed.

before(20,sec)

Tips

  • You can use before statements in Test Sequence and Test Assessment blocks and in Stateflow® charts.

  • To return true until a When decomposition test step has been active for a specified time, use the before operator in the body of the When decomposition test step.

  • To return true until the parent step of a When decomposition step has been active for a specified time, use the before operator in the When condition expression.

Version History

Introduced in R2015a