code: function timeCalculator(progress, selfInvoker) {
          if (isStoppedTimer) return;
  
          var step = 1;
  
          var remainingProgress = 1.0 - progress.position;
  
          var estimatedCompletionTime = Math.round((remainingProgress / progress.position) * progressIterations);
          var estimatedHours, estimatedMinutes, estimatedSeconds, displayHours, displayMinutes, displaySeconds;
          progressIterations += step;
  
          if (progress.position < 1.0) {
              if (isFinite(estimatedCompletionTime)) {
                  estimatedHours = Math.floor(estimatedCompletionTime / 3600);
                  displayHours = estimatedHours > 9 ? estimatedHours : '0' + estimatedHours;
                  estimatedMinutes = Math.floor((estimatedCompletionTime / 60) % 60);
                  displayMinutes = estimatedMinutes > 9 ? estimatedMinutes : '0' + estimatedMinutes;
                  estimatedSeconds = estimatedCompletionTime % 60;
                  displaySeconds = estimatedSeconds > 9 ? estimatedSeconds : '0' + estimatedSeconds;
              }
  
              var output = '';
              if (displayHours > 0) {
                  output += displayHours + ' hours ';
              }
              if (displayMinutes > 0) {
                  output += displayMinutes + ' minutes ';
              }
              if (displaySeconds > 0) {
                  output += displaySeconds + ' seconds ';
              }
              if (output.length) {
                  progressHelper.callback(output);
              }
          }
  
          setTimeout(function() {
              timeCalculator(progress, true);
          }, step * ONE_SECOND);
      }
docs: https://github.com/23/resumable.js/issues/168#issuecomment-65297110