ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > Procedures > Writing a procedure using the procedure editor > Errors and warnings while writing a procedure > Error: Both sides of the operator cannot be 'Time elapsed' events

Error: Both sides of the operator cannot be 'Time elapsed' events

Description

This error is displayed in the list of errors and warnings at the bottom of the procedure editor when you are using any Logical operator ('AND' or 'OR'), and you've used a 'Time elapsed' event on both sides of the operator.

More information

When a procedure waits for a 'Time elapsed' event, it starts waiting at the time that it first encounters the Wait until statement (not the time elapsed from the start of the procedure). So if the same wait statement is waiting for two different times, it will start waiting for them both at the same time. Obviously, this means that the shorter of the two times will always elapse first. ANY-maze prevents you getting into this situation by flagging this situation as an error.

  

The following procedure snippet will cause this error:

  

  

Figure 1. When waiting for two 'Time elapsed' events, one of them will always occur first. For this reason, the statement above does not make sense, and so ANY-maze will flag this as an error.

If you need to perform some action based on a time having elapsed since the start of the test, you have a number of options:

 Wait for the test clock to reach a specific time (note that you'll need to wait for the test clock to be greater than or equal to this time). 
 Create your own user-defined event to occur at a certain time after the test starts, and wait for this event. 
 Use Wait until statements with 'Time elapsed' events, but make the times cumulative so that each one adds to the total time since the start of the test.  

See also:

 Errors and warnings while writing a procedure 
 Errors and warnings while running a procedure 
 Waiting for times to elapse 
 Logical operators 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0506