public static DelayedCall CreateAsync(DelayedCall.Callback cb, int milliseconds) { DelayedCall delayedCall = new DelayedCall(); DelayedCall.PrepareDCObject(delayedCall, milliseconds, true); delayedCall.callback = cb; return(delayedCall); }
public DelayedCall(DelayedCall.Callback cb, int milliseconds) : this() { DelayedCall.PrepareDCObject(this, milliseconds, false); this.callback = cb; if (milliseconds > 0) { this.Start(); } }
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); }
public DelayedCall(DelayedCall.Callback cb) : this() { DelayedCall.PrepareDCObject(this, 0, false); this.callback = cb; }