**CIGAL Reference Manual, Chapter 6 (RealTime): r_wait** ===== r_wait -- Wait until a specified time ===== **usage: r_wait opflg eflag ltime TimeVal Flag** Wait until time TIMEVAL. This command makes it possible to control the timing of a program based on time intervals stored in a data variable. Whereas the LTIME argument for most REALTIME commands is evaluated when the realtime program is compiled (and is therefore treated as a constant), the TIMEVAL argument to R_WAIT is evaluated at runtime and therefore can take on different values at different times. The FLAG argument can be used to make the specified TIMEVAL a relative time, as follows: FLAG = 0 - time is relative to last R_RESET,or start of program if no R_RESET (this is default) 1 - time is relative to previous operation 2 - time is relative to start of most recent R_REPEAT loop For this command the value of the LTIME argument is ignored. HOWEVER, specifying a LTIME argument that is preceded by a '+' (e.g. +0) causes the TIMEVAL argument to be treated as a relative wait. This is treated exactly the same as specifying FLAG=1. **See Also:**\\ [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter6|RealTime List]], [[jvs:cigal:manual:help|Manual Help]]