Waits for the selected event to occur.
Optional event mask to react only on certain events
The overload taking the timeout parameter returns true if an event was received on time and false otherwise.
See Implementation
Waits for the selected event to occur.