예제 #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);
        }
예제 #2
0
 public bool Wait(DispatchTime timeout)
 {
     Check();
     return(dispatch_group_wait(handle, timeout.Nanoseconds) == 0);
 }
예제 #3
0
 public DispatchTime(DispatchTime when, TimeSpan delta) : this()
 {
     Nanoseconds = dispatch_time(when.Nanoseconds, delta.Ticks * 100);
 }
예제 #4
0
 public DispatchTime(DispatchTime when, long deltaNanoseconds)
     : this()
 {
     Nanoseconds = dispatch_time(when.Nanoseconds, deltaNanoseconds);
 }
예제 #5
0
 public void SetTimer(DispatchTime time, long nanosecondInterval, long nanosecondLeeway)
 {
     Check();
     dispatch_source_set_timer(handle, time.Nanoseconds, nanosecondInterval, nanosecondLeeway);
 }
예제 #6
0
		public bool Wait (DispatchTime timeout)
		{
			Check ();			
			return dispatch_group_wait (handle, timeout.Nanoseconds) == 0;
		}
예제 #7
0
		public DispatchTime (DispatchTime when, TimeSpan delta) : this ()
		{
			Nanoseconds = dispatch_time (when.Nanoseconds, delta.Ticks * 100);
		}
예제 #8
0
		public DispatchTime (DispatchTime when, long deltaNanoseconds)
			: this ()
		{
			Nanoseconds = dispatch_time (when.Nanoseconds, deltaNanoseconds);
		}
예제 #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);
		}
예제 #10
0
 public void SetTimer(DispatchTime time, long nanosecondInterval, long nanosecondLeeway)
 {
     Check ();
     dispatch_source_set_timer (handle, time.Nanoseconds, nanosecondInterval, nanosecondLeeway);
 }