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); }
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(); }
//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(); } }