wait Function
Pauses the current context for a specified amount of time.
_CRTIMP void __cdecl wait(
unsigned int _Milliseconds
);
Parameters
- _Milliseconds
The number of milliseconds that the current context should be paused for. If the _Milliseconds parameter is set to the value 0, it indicates that the current context should yield execution to other runnable contexts before continuing.
Remarks
If this method is called on a Concurrency Runtime scheduler context, the scheduler will find a different context to run on the underlying resource. Since the scheduler is cooperative in nature, this context may not resume exactly after the number of milliseconds specified. If the scheduler is busy executing other tasks that do not cooperatively yield to the scheduler in a hurry, the wait period could be indefinite.
Requirements
Header: concrt.h
Namespace: Concurrency