of tasks. The tasks must not overlap.
   *
   * @param {!tr.b.math.Range} A time window.
   * @param {!Array.<!{start: number, end: number}>} A list of tasks.
   * @returns {number}
   */
  function expectedQueueingTime(window, tasks) {
    return weightedExpectedQueueingTime(window, tasks.map(function(task) {
      return { start: task.start, end: task.end, weight: 1 };
    }));
  }

  /**
   * Object of this calss represents the sliding window and maintains its
   * main invariant: windowEQT = firstTaskEQ