fInterest
   * @return {number}
   */
  function getWallClockSelfTime_(event, rangeOfInterest) {
    if (event.duration === 0) return 0;

    const selfTimeRanges = [rangeOfInterest.findIntersection(event.range)];
    for (const subSlice of event.subSlices) {
      if (selfTimeRanges.length === 0) return 0;

      const lastRange = selfTimeRanges.pop();
      selfTimeRanges.push(
          ...tr.b.math.Range.findDifference(lastRange, subSlice.range));
    }

    return tr.b.math.Statistics.sum(selfTimeRange