private static uint AddTimer(TimerTask p) { lock (mQueueLock) { mPriorityQueue.Enqueue(p.TimerId, p, p.NextTick); } return(p.TimerId); }
private static TimerTask GetTimerData(AbstractCallback callback, uint start, int interval) { TimerTask task = new TimerTask(callback); task.Interval = interval; task.TimerId = ++mNextTimerId; task.NextTick = mCurrentTick + 1 + start; return(task); }