La interfaz de VDS Renaissance está disponible en varios idiomas. La documentación oficial se mantiene en inglés para garantizar una referencia única, coherente y siempre actualizada.

WAIT

Windows Linux macOS

Syntax

WAIT <interval>

WAIT EVENT, <interval>

Description

Pauses execution of the script until an event occurs, or until after <interval> seconds have elapsed. If neither EVENT nor <interval> are specified, the script will pause for 1 second.

The value for <interval> may be a floating-point value. The minimum value that can be specified is 0. The minimum time that the script will actually wait for is governed by the default or specified value of OPTION SLEEPTIME. Because Windows is a multi-tasking system, the interval that the script will be paused for is not exact. The script will resume some time after <interval> has elapsed, when Windows gives CPU time to the process.

If both EVENT and <interval> are specified, then a TIMER event will be generated when the interval has elapsed. This event can be determined in the usual way, using @EVENT.

OK

Unchanged.

Example

  %T = @INPUT(Enter alarm time [hh:mm]:)
:loop
  WAIT event,30
  goto @event()
:timer
  %N = @datetime(t)
  if @equal(%T,%N)
    beep
    warn Wake up!
  end
  goto loop
:close
  stop

See also