@ <RetVar/IF> wait <Var/Number> ms

Previous: dec <RetVar> = General Commands Next: @ <RetVar/IF> wait randomly from <Var/Number> to <Var/Number> ms
This page is a chapter in the book General Commands.
@ [[skip|else] if [not]|while [not]|<RetVar/IF> = ] wait <Var/Number> ms

Causes the script to pause for the length of time specified by <Var/Number>.
The delay is approximate.
Generally it can be counted on that the delay will be at least for the specified length of time.
No delay can be less than the length of time it takes for one screen refresh (see Note), so a one millisecond wait will delay until the next refresh.

Note:
Take the current refresh rate in frames per second and divide that into 1000 to get the number of milliseconds per frame.
This will be the minimum wait time.
A utility called 'fraps' (http://www.fraps.com) can tell you what your current frame rate is.
Of course, the frame rate in any given situation will depend on the processing power of the user's computer who is running your script.
But it's a good thing to remember that any wait placed in your script will delay for at least one frame.
For example, any wait placed inside a loop will cause the loop to iterate at most once per frame.

General Commands - Contents


Posting Permissions

Posting Permissions
  • You may not create new articles
  • You may not edit articles
  • You may not protect articles
  • You may not post comments
  • You may not post attachments
  • You may not edit your comments