public bool condition_timed_wait (IOCondition condition, int64 timeout_us, Cancellable? cancellable = null) throws Error
Waits for up to
timeout_us microseconds for
condition to become true on this.
If the condition is met, true is returned.
cancellable is cancelled before the condition is met, or if
timeout_us (or the socket's
timeout) is reached before the condition is met, then
false is returned and throws, if non-null,
is set to the appropriate value (g_io_error_cancelled or g_io_error_timed_out
If you don't want a timeout, use condition_wait. (Alternatively, you can
pass -1 for
Note that although
timeout_us is in microseconds for consistency with other GLib APIs, this function actually only has millisecond
resolution, and the behavior is undefined if
timeout_us is not an exact number of milliseconds.
a IOCondition mask to wait for
the maximum time (in microseconds) to wait, or -1
a Cancellable, or null
true if the condition was met, false otherwise