Пример #1
0
        private void _countdownTimer_Tick(object sender, EventArgs e)
        {
            SetCountDownBoom(_timeToBoom.Subtract(new TimeSpan(0, 0, 1)));

            Debug.WriteLine("TICK " + _timeToBoom.Seconds);

            if (_timeToBoom.TotalSeconds <= 0)
            {
                OnTimerZero?.Invoke(this, new EventArgs());
            }

            txtBlk.Text = string.Format("{2}:{0}:{1}", _timeToBoom.Minutes, _timeToBoom.Seconds, _timeToBoom.Hours);
        }
Пример #2
0
        private void _countdownTimer_Tick(object sender, EventArgs e)
        {
            SetCountDownBoom(_timeToBoom.Subtract(new TimeSpan(0, 0, 1)));

            Debug.WriteLine("TICK " + _timeToBoom.Seconds);

            if (_timeToBoom.TotalSeconds <= 0)
            {
                OnTimerZero?.Invoke(this, new EventArgs());
            }

            SetText();
        }
Пример #3
0
    //FORMULA PARA SABER CUANTOS TICKmILISECONDSsON
    //3600*1000*nHoras
    // 3600*1000*12 = 43200000


    private void Update()
    {
        if (stopTimer)
        {
            return;
        }

        if (rest)
        {
            initTime -= Time.deltaTime;
        }
        else
        {
            initTime += Time.deltaTime;
        }

        CheckTimerType();

        if (initTime <= 0)
        {
            OnTimerZero?.Invoke();
        }
    }