- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 - 31
 - 32
 - 33
 - 34
 - 35
 - 36
 - 37
 - 38
 - 39
 - 40
 - 41
 - 42
 - 43
 - 44
 - 45
 - 46
 - 47
 - 48
 - 49
 - 50
 - 51
 - 52
 - 53
 - 54
 
                        public class zTimer
{
    object SomeTag;
    int StartTime;
    int TimeOut;
    public int Start(int Value, object tag)
    {
        SomeTag = tag;
        TimeOut = Value;
        StartTime = MakeLngTime(DateTime.Now);
        return StartTime;
    }
    public int MakeLngTime(DateTime Tm)
    {
       return ((Tm.Day * 24 + Tm.Hour) * 60 + Tm.Minute) * 60 + Tm.Second;
    }
    public bool IsTimeOut(object tag)
    {
        if (tag != null && SomeTag != null)
        {
            if (tag == SomeTag)
            {
                if (MakeLngTime(DateTime.Now) > StartTime + TimeOut)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                StartTime = MakeLngTime(DateTime.Now);
                SomeTag = tag;
                return false;
            }
        }
        else
        {
            if (MakeLngTime(DateTime.Now) > StartTime + TimeOut)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
                                     
        
            Могучий таймер. Особое внимание стоит уделить методу MakeLngTime.