Esempio n. 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);
        }
Esempio n. 2
0
 public DelayedCall(DelayedCall.Callback cb, int milliseconds) : this()
 {
     DelayedCall.PrepareDCObject(this, milliseconds, false);
     this.callback = cb;
     if (milliseconds > 0)
     {
         this.Start();
     }
 }
Esempio n. 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);
        }
Esempio n. 4
0
 public DelayedCall(DelayedCall.Callback cb) : this()
 {
     DelayedCall.PrepareDCObject(this, 0, false);
     this.callback = cb;
 }