SetTimeout

From NSB App Studio
Revision as of 19:33, 8 July 2012 by Brendon (talk | contribs) (Created page with "SETTIMEOUT (''function'', ''milliseconds'') '''Description''' SETTIMEOUT is used to schedule an event for a future time, where function is the name of the SUB or FUNCTION to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SETTIMEOUT (function, milliseconds)

Description

SETTIMEOUT is used to schedule an event for a future time, where function is the name of the SUB or FUNCTION to be called, and milliseconds is how long in the future it is to be called. Execution does not halt at this statement – it continues with the next statement. It returns a reference to the timeout action which can be used in CLEARTIMEOUT.

Example

Rem SetTimeout statement
T=setTimeout(nextAction,3000)
 
Function nextAction()
  msgbox "nextAction"
end function

Output




nextAction appears 3 seconds later

Related Items

CLEARINTERVAL, CLEARTIMEOUT, SETINTERVAL