mrchimp / tock

Timer Object/Class. Kickass!
MIT License
237 stars 33 forks source link

A little doubt, assignment this.pause_time(line 178) repeated, because next mothod this.stop() will do it. #46

Open LianJilu opened 5 years ago

LianJilu commented 5 years ago
Tock.prototype.pause = function () {
    if ( this.go ) {
      this.pause_time = this.lap();
      this.stop();
    }
   ...
 };

Tock.prototype.stop = function () {
   this.pause_time = this.lap();
   this.go = false;

   clearTimeout(this.timeout);
   ...
};