<commit_before>define('accurate-timer', function () {
  'use strict';

  var AccurateTimer = function () {
    // default parameters
    this.fps = 30;
    this.interval = null;
    this.intervalStart = null;
    this.elapsed = null;
  };

  AccurateTimer.EVENT_TICK = 'tick';

  AccurateTimer.prototype.start = function () {
    this.pause();
    if (!this.intervalStart) {
      this.intervalStart = Date.now();
    }
    this.interval = setInterval(this.tick.bind(this), 1000 / this.fps);
  };

  AccurateTimer.prototype.tick = function () {
    this.elapsed = Date.now() - this.intervalStart;
    this.dispatchEvent(new CustomEvent(AccurateTimer.EVENT_TICK));
  };

  AccurateTimer.prototype.pause = function () {
    if (this.interval) {
      clearInterval(this.interval);
    }
  };

  AccurateTimer.prototype.stop = function () {
    this.pause();
    this.elapsed = 0;
  };

  return AccurateTimer;
});<commit_msg>extending eventEmitter<commit_after>define('accurate-timer', ['EventEmitter'], function (EventEmitter) {
  'use strict';

  var AccurateTimer = function () {
    // default parameters
    this.fps = 30;
    this.interval = null;
    this.intervalStart = null;
    this.elapsed = null;
  };

  AccurateTimer.prototype = new EventEmitter();

  AccurateTimer.TICK = 'tick';

  AccurateTimer.prototype.start = function () {
    this.pause();
    if (!this.intervalStart) {
      this.intervalStart = Date.now();
    }
    this.interval = setInterval(this.tick.bind(this), 1000 / this.fps);
  };

  AccurateTimer.prototype.tick = function () {
    this.elapsed = Date.now() - this.intervalStart;
    this.emitEvent(AccurateTimer.TICK);
  };

  AccurateTimer.prototype.pause = function () {
    if (this.interval) {
      clearInterval(this.interval);
    }
  };

  AccurateTimer.prototype.stop = function () {
    this.pause();
    this.elapsed = 0;
  };

  return AccurateTimer;
});
{'fraction_non_alphanumeric': 0.14518674381904262, 'fraction_numerical': 0.007364544976328248, 'mean_word_length': 3.0991379310344827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4081616', 'n_tokens_mistral': 643, 'n_tokens_neox': 600, 'n_words': 103}