s.lastTaskIndex_) {
          // The old last task is completely inside the window.
          // Account it in innerEQT.
          this.innerEQT_ += contributionToEQT(this.range_,
              this.sortedTasks_[this.lastTaskIndex_]);
        }
        this.lastTaskIndex_++;
      }
    }
  }

  /**
   * Returns maximum expected queueing time for time window of the given size
   * that slides from the startTime to the endTime:
   *   max { expectedQueueingTime(window(t, t + windowSize), tasks),
   *        