Syntax
void vm_thread_sleep(
    VMUINT32 time_out
);
ContentsIndex
PreviousUpNext
vm_thread_sleep
Example
Syntax
void vm_thread_sleep(
    VMUINT32 time_out
);
Description

Makes a thread sleep for a number of milliseconds. It should only be used in the threads spawned from vm_thread_create(). Note, putting a thread into the sleep for too long could potentially cause unexpected behavior. If the thread, which is responsible for reading from a message queue, was put into sleep for too long, for example, the message queue might overflow because of too many unprocessed messages.

Parameters
Parameters 
Description 
VMUINT32 time_out 
[IN] The duration of the sleep, in milliseconds. 
Returns

void

Example
VMINT vm_sub_thread_proc(VM_THREAD_HANDLE thread_handle, void* user_data)
{
     // Do something here.
     vm_thread_sleep(3000); // Sleeps for 3,000 milliseconds.
 }
File

vmthread.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.