Wait

This function will wait until an event occurs and then return it. Real-time applications should only call this function when Peek() returns true, in order to avoid pausing the program.

Syntax

Returns

Returns the next event in the event queue and removes it.