Name
Sleep -- sleep for a certain amount of time (V6.0, optional)
Synopsis
int error = Sleep(lua_State *L, int ms);
Function
This function must put the application to sleep for the requested amount of milliseconds. It is important that this is done in a way that lets the application stay responsive, i.e. you must make sure that you keep handling window events and you also must call into hw_MasterServer() frequently to keep videos playing. If the user closes the display while sleeping, you should return ERR_USERABORT so that Hollywood can shutdown.

Sleep() is an optional API and must only be implemented if HWSDAFLAGS_SLEEP has been passed to hw_SetDisplayAdapter(). See hw_SetDisplayAdapter for details.

Note that when compiling for 64-bit Windows, this function must be called _Sleep instead. Otherwise there will be clashes with the function of the same name from kernel32.lib. On 32-bit Windows this isn't a problem because 32-bit Windows uses decorated function exports.

Inputs
L
pointer to the lua_State
ms
number of milliseconds to sleep
Results
error
error code or 0 for success

Show TOC