Sleep

Puts the computer into idle state by putting the current thread to sleep.

More efficient than using VFP's keyboard timeout values that are dependent on user input and keypresses to interrupt the timeout process.

o.Sleep(lnMilliSecs)

Parameters

lnMilliSecs
Milliseconds to sleep

Remarks

This method is both a standalone function and wwAPI class method for backwards compatibility.

Example

FOR x = 1 to 1000
   DoSomething()
   Sleep(2)  && Cause a context switch and give up time slices
ENDFOR

loAPI = CREATEOBJECT("wwAPI")
FOR x = 1 to 1000
   DoSomething()
   loAPI.Sleep(2)  && Cause a context switch and give up time slices
ENDFOR

See also:

Class wwAPI

© West Wind Technologies, 2004-2017 • Updated: 08/05/07
Comment or report problem with topic