1. JavaScript / Говнокод #26878

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    updateTimer() {
                requestAnimationFrame(() => {
                    this.timeLeft = this.resendTimeDuration - (Date.now() * 0.001 - this.lastTimeLeft);
    
                    if (this.timeLeft <= 0) {
                        this.resetTimer();
                        return;
                    } else {
                        this.lastTimeLeft = this.timeLeft;
                        this.updateTimer();
                    }
                });
    }

    А как сделать таймер обратного отсчета?

    Запостил: somebodyoncetoldme, 18 Августа 2020

    Комментарии (1) RSS

    Добавить комментарий