Example #1
0
        public static DelayedCall CreateAsync(DelayedCall.Callback cb, int milliseconds)
        {
            DelayedCall delayedCall = new DelayedCall();

            DelayedCall.PrepareDCObject(delayedCall, milliseconds, true);
            delayedCall.callback = cb;
            return(delayedCall);
        }
Example #2
0
 public DelayedCall(DelayedCall.Callback cb, int milliseconds) : this()
 {
     DelayedCall.PrepareDCObject(this, milliseconds, false);
     this.callback = cb;
     if (milliseconds > 0)
     {
         this.Start();
     }
 }
Example #3
0
        public static DelayedCall StartAsync(DelayedCall.Callback cb, int milliseconds)
        {
            DelayedCall delayedCall = DelayedCall.CreateAsync(cb, milliseconds);

            if (milliseconds > 0)
            {
                delayedCall.Start();
            }
            else if (milliseconds == 0)
            {
                delayedCall.FireNow();
            }
            return(delayedCall);
        }
Example #4
0
 public DelayedCall(DelayedCall.Callback cb) : this()
 {
     DelayedCall.PrepareDCObject(this, 0, false);
     this.callback = cb;
 }