function resetTimer() {
              if( cancelTimer ) {
                cancelTimer();
                cancelTimer = null;
              }
              if( start && Date.now() - start > maxWait ) {
                if(!runScheduledForNextTick){
                  runScheduledForNextTick = true;
                  utils.compile(runNow);
                }
              }
              else {
                if( !start ) { start = Date.now(); }
                cancelTimer = utils.wait(runNow, wait);
              }
            }
A rudimentary debounce method
@param {function} fn the function to debounce
@param {object} [ctx] the `this` context to set in fn
@param {int} wait number of milliseconds to pause before sending out after each invocation
@param {int} [maxWait] max milliseconds to wait before sending out, defaults to wait * 10 or 100