code: function _setTimeIfInRange(clock, timeToSet, stopTime) {
    stopTime = defaultValue(stopTime, clock.stopTime);
  
    if (JulianDate.lessThan(timeToSet, clock.startTime)) {
      clock.currentTime = clock.startTime.clone();
    } else if (JulianDate.greaterThan(timeToSet, stopTime)) {
      clock.currentTime = stopTime.clone();
    } else {
      clock.currentTime = timeToSet.clone();
    }
  }
docs: Set time to nearest time to specified (may be start or end of time range if time is not in range).
  @param {DataSourceClock} clock clock to set current time on.
  @param {JulianDate} timeToSet the time to set
  @param {JulianDate} [stopTime=clock.stopTime] The stop time to use instead of `clock.stopTime`. This is useful to
  position the clock at the start of the final interval instead of at its end.
  @private