timed_wait
Description:
[ Version ( deprecated_since = "2.32" , replacement = "wait_until" ) ]
public bool timed_wait (Mutex mutex, TimeVal abs_time)
public bool timed_wait (Mutex mutex, TimeVal abs_time)
Warning: timed_wait is deprecated since 2.32. Use wait_until.
Waits until this thread is woken up on this, but not longer than until the time specified by abs_time
.
Note:
Use wait_until instead.
The mutex
is unlocked before falling asleep and locked again before resuming.
If abs_time
is null, timed_wait acts like
wait.
This function can be used even if g_thread_init
has not yet been called, and, in that case, will immediately return
true.
To easily calculate abs_time
a combination of get_real_time and
add can be used.
Parameters:
this |
a Cond |
mutex |
a Mutex that is currently locked |
abs_time |
a TimeVal, determining the final time |
Returns:
true if this was signalled, or false on timeout |