public void restart() {
        this.lock.lock();
        try {
            if (this.destroyed) {
                return;
            }
            this.stopped = false;
            this.running = true;
            schedule();
        } finally {
            this.lock.unlock();
        }
    }
Restart the timer.
It will be started if it's stopped, and it will be restarted if it's running.

@author Qing Wang (kingchin1218@gmail.com)

2020-Mar-26 20:38:37 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/util/RepeatedTimer.java