Beispiel #1
0
    public static uint AddTimer(uint start, int interval, Action handler)
    {
        TimerData timerData = TimerHeap.GetTimerData <TimerData>(new TimerData(), start, interval);

        timerData.Action = handler;
        return(TimerHeap.AddTimer(timerData));
    }
Beispiel #2
0
    public static uint AddTimer <T>(uint start, int interval, Action <T> handler, T arg1)
    {
        TimerData <T> timerData = TimerHeap.GetTimerData <TimerData <T> >(new TimerData <T>(), start, interval);

        timerData.Action = handler;
        timerData.Arg1   = arg1;
        return(TimerHeap.AddTimer(timerData));
    }
Beispiel #3
0
    public static uint AddTimer <T, U, V>(uint start, int interval, Action <T, U, V> handler, T arg1, U arg2, V arg3)
    {
        TimerData <T, U, V> timerData = TimerHeap.GetTimerData <TimerData <T, U, V> >(new TimerData <T, U, V>(), start, interval);

        timerData.Action = handler;
        timerData.Arg1   = arg1;
        timerData.Arg2   = arg2;
        timerData.Arg3   = arg3;
        return(TimerHeap.AddTimer(timerData));
    }