Halts the current thread to invoke an event loop.
The total number of milliseconds to sleep.
The type of value that will be resolved.
A promise that resolves with val after ms milliseconds.
Optional
A promise that resolves after ms milliseconds.
The value to resolve with.
Halts the current thread to invoke an event loop.
Param: ms
The total number of milliseconds to sleep.
Param: T
The type of value that will be resolved.
Returns
A promise that resolves with val after ms milliseconds.