Beispiel #1
0
        public void DispatchAfter(DispatchTime when, NSAction action)
        {
            if (action == null)
            {
                throw new ArgumentNullException("action");
            }

            dispatch_after_f(when.Nanoseconds, handle, (IntPtr)GCHandle.Alloc(Tuple.Create(action, this)), static_dispatch);
        }
Beispiel #2
0
 public bool Wait(DispatchTime timeout)
 {
     Check();
     return(dispatch_group_wait(handle, timeout.Nanoseconds) == 0);
 }
Beispiel #3
0
 public DispatchTime(DispatchTime when, TimeSpan delta) : this()
 {
     Nanoseconds = dispatch_time(when.Nanoseconds, delta.Ticks * 100);
 }
Beispiel #4
0
 public DispatchTime(DispatchTime when, long deltaNanoseconds)
     : this()
 {
     Nanoseconds = dispatch_time(when.Nanoseconds, deltaNanoseconds);
 }
 public void SetTimer(DispatchTime time, long nanosecondInterval, long nanosecondLeeway)
 {
     Check();
     dispatch_source_set_timer(handle, time.Nanoseconds, nanosecondInterval, nanosecondLeeway);
 }
Beispiel #6
0
		public bool Wait (DispatchTime timeout)
		{
			Check ();			
			return dispatch_group_wait (handle, timeout.Nanoseconds) == 0;
		}
Beispiel #7
0
		public DispatchTime (DispatchTime when, TimeSpan delta) : this ()
		{
			Nanoseconds = dispatch_time (when.Nanoseconds, delta.Ticks * 100);
		}
Beispiel #8
0
		public DispatchTime (DispatchTime when, long deltaNanoseconds)
			: this ()
		{
			Nanoseconds = dispatch_time (when.Nanoseconds, deltaNanoseconds);
		}
Beispiel #9
0
		public void DispatchAfter (DispatchTime when, NSAction action)
		{
			if (action == null)
				throw new ArgumentNullException ("action");

			dispatch_after_f (when.Nanoseconds, handle, (IntPtr) GCHandle.Alloc (Tuple.Create (action, this)), static_dispatch);
		}
Beispiel #10
0
 public void SetTimer(DispatchTime time, long nanosecondInterval, long nanosecondLeeway)
 {
     Check ();
     dispatch_source_set_timer (handle, time.Nanoseconds, nanosecondInterval, nanosecondLeeway);
 }