code: function functionsWithinRange(startMillis, endMillis) {
      var fnsToRun = [];
      for (var timeoutKey in scheduledFunctions) {
        var scheduledFunc = scheduledFunctions[timeoutKey];
        if (scheduledFunc &&
            scheduledFunc.runAtMillis >= startMillis &&
              scheduledFunc.runAtMillis <= endMillis) {
          //remove fn -- we'll reschedule later if it is recurring.
          self.removeFunctionWithId(timeoutKey);
          if (!scheduledFunc.recurring) {
            fnsToRun.push(scheduledFunc); // schedules each function only once
          } else {
            fnsToRun.push(buildNthInstanceOf(scheduledFunc, 0));
            var additionalTimesFnRunsInRange =
              Math.floor((endMillis - scheduledFunc.runAtMillis) / scheduledFunc.millis);
            for (var i = 0; i < additionalTimesFnRunsInRange; i++) {
              fnsToRun.push(buildNthInstanceOf(scheduledFunc, i + 1));
            }
            reschedule(buildNthInstanceOf(scheduledFunc, additionalTimesFnRunsInRange));
          }
        }
      }
  
      return fnsToRun;
    }
docs: finds/dupes functions within range and removes them.