<commit_before>/* jshint globalstrict: true */
/* jshint browser: true */
/* jshint devel: true */
/* jshint jquery: true */
/* global util */
'use strict';

var makeState = function(initial) {
  var checkpoints = [];
  var maxTime = 0;
  var timers = [];
  var prev = function(time) {
      return util.greatestLower(checkpoints,
                                function(m) { return m.time > time; });
  };
  var runTimers = function(time) {
      timers = timers.filter(function(timer) {
        if (timer.time <= time) {
          timer.callback();
          return false;
        } else {
          return true;
        }
      });<commit_msg>Make timers able to seek<commit_after>/* jshint globalstrict: true */
/* jshint browser: true */
/* jshint devel: true */
/* jshint jquery: true */
/* global util */
'use strict';

var makeState = function(initial) {
  var checkpoints = [];
  var maxTime = 0;
  var timers = [];
  var prev = function(time) {
      return util.greatestLower(checkpoints,
                                function(m) { return m.time > time; });
  };
  var runTimers = function(time) {
    var fire = [];
    timers = timers.filter(function(timer) {
      if (timer.time <= time) {
        fire.push(timer);
        return false;
      } else {
        return true;
      }
    });
    fire.forEach(function(timer) {
      timer.callback();
    });
{'fraction_non_alphanumeric': 0.14254545454545456, 'fraction_numerical': 0.0014545454545454545, 'mean_word_length': 2.106094808126411, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '544847', 'n_tokens_mistral': 430, 'n_tokens_neox': 421, 'n_words': 108}