public void DispatchAfter(DispatchTime when, Action action) { if (action == null) { throw new ArgumentNullException("action"); } dispatch_after_f(when.Nanoseconds, Handle, (IntPtr)GCHandle.Alloc(Tuple.Create(action, this)), static_dispatch); }
public void DispatchAfter(DispatchTime when, DispatchBlock block) { if (block == null) { throw new ArgumentNullException(nameof(block)); } dispatch_after(when.Nanoseconds, GetCheckedHandle(), block.GetCheckedHandle()); }
public bool Wait(DispatchTime timeout) { return(dispatch_group_wait(GetCheckedHandle(), timeout.Nanoseconds) == 0); }
public DispatchTime(DispatchTime when, TimeSpan delta) : this() { Nanoseconds = dispatch_time(when.Nanoseconds, delta.Ticks * 100); }
public DispatchTime(DispatchTime when, long deltaNanoseconds) : this() { Nanoseconds = dispatch_time(when.Nanoseconds, deltaNanoseconds); }
public nint Wait(DispatchTime time) { return(dispatch_block_wait(GetCheckedHandle(), time)); }
extern static nint dispatch_block_wait(IntPtr block, DispatchTime time);
public void SetTimer(DispatchTime time, long nanosecondInterval, long nanosecondLeeway) { dispatch_source_set_timer(GetCheckedHandle(), time.Nanoseconds, nanosecondInterval, nanosecondLeeway); }
public void SetTimer(DispatchTime time, long nanosecondInterval, long nanosecondLeeway) { Check(); dispatch_source_set_timer(handle, time.Nanoseconds, nanosecondInterval, nanosecondLeeway); }
public bool Wait(DispatchTime timeout) { Check(); return(dispatch_group_wait(handle, timeout.Nanoseconds) == 0); }