wwAPI::WinApi_Sleep

Puts the current process thread to sleep for the specified number of milliseconds.

Pass llUseDoEvents for longer waits which waits for 100ms stretches interspersed with DOEVENTS that try to keep the FoxPro UI somewhat responsive while waiting (ie. no White Screen of Death).

Regardless of using this flag - it's best not to wait for more than a few seconds here to avoid UI jankiness.

Note: This is a static function not a class method

WinApi_Sleep(lnMilliseconds, llUseDoEvents)

Parameters

lnMilliseconds
Number of milliseconds to Sleep

llUseDoEvents if .T. this breaks the milliseconds into 100ms chunks in a loop and fires DOEVENTS along with the operation. This will keep the FoxPro UI active and allow FoxPro to fire events during the sleep operation.

Note that this will increase the actual sleep time somewhat (~5% depending on events fired in VFP) so adjust as needed.

See also

Class wwAPI