code: function updateTerriaClockWatcher(catalogItem) {
    if (
      catalogItem._mirroringTerriaClock &&
      !defined(catalogItem._removeTerriaClockWatch)
    ) {
      // We are using the terria clock, add a subscription to copy the current time into this items clock.
      catalogItem._removeTerriaClockWatch = catalogItem.terria.clock.onTick.addEventListener(
        terriaClock => {
          if (
            !JulianDate.equals(
              terriaClock.currentTime,
              catalogItem.clock.currentTime
            )
          ) {
            updateCurrentTime(catalogItem, terriaClock.currentTime);
          }
        }
      );
    } else if (
      !catalogItem._mirroringTerriaClock &&
      defined(catalogItem._removeTerriaClockWatch)
    ) {
      // We are no longer using the terria clock, remove the subscription.
      catalogItem._removeTerriaClockWatch();
      catalogItem._removeTerriaClockWatch = undefined;
    }
  }
docs: This function adds / removes a subscription to copy the time from the terria clock into the items clock when .useOwnClock is false.
  
  @param catalogItem The item to add / remove the terria clock watching subscription from.
  @private