public bool Wait (uint mseconds) { _TimeVal tv = new _TimeVal (); long sec = mseconds / 1000; long usec = 1000 * (mseconds - sec * 1000); tv.sec = (IntPtr) (sec); tv.usec = (IntPtr) (usec); return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv); }
public bool Wait (TimeSpan timespan) { _TimeVal tv = new _TimeVal (); long sec = (long) timespan.TotalSeconds; long usec = 1000 * ( ( (long) timespan.TotalMilliseconds) - sec * 1000); tv.sec = (IntPtr) (sec); tv.usec = (IntPtr) (usec); return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv); }
static extern bool g_cond_timed_wait (IntPtr cond, IntPtr mutex, ref _TimeVal abs_time);