If the clock property is not set, then create one based on frequency.
773829
def _create_clock(self):
        
        trading_o_and_c = self.trading_calendar.schedule.ix[
            self.sim_params.sessions]
        market_closes = trading_o_and_c['market_close']
        minutely_emission = False

        if self.sim_params.data_frequency == 'minute':
            market_opens = trading_o_and_c['market_open']
            minutely_emission = self.sim_params.emission_rate == "minute"

            # The calendar's execution times are the minutes over which we
            # actually want to run the clock. Typically the execution times
            # simply adhere to the market open and close times. In the case of
            # the futures calendar, for example, we only want to simulate over
            # a subset of the full 24 hour calendar, so the execution times
            # dictate a market open time of 6:31am US/Eastern and a close of
            # 5:00pm US/Eastern.
            execution_opens = \
                self.trading_calendar.execution_time_from_open(market_opens)
            execution_closes = \
                self.trading_calendar.execution_time_from_close(market_closes)
        else:
            # in daily mode, we want to have one bar per session, timestamped
            # as the last minute of the session.
            execution_closes = \
                self.trading_calendar.execution_time_from_close(market_closes)
            execution_opens = execution_closes

        # FIXME generalize these values
        before_trading_start_minutes = days_at_time(
            self.sim_params.sessions,
            time(8, 45),
            "US/Eastern"
        )

        return MinuteSimulationClock(
            self.sim_params.sessions,
            execution_opens,
            execution_closes,
            before_trading_start_minutes,
            minute_emission=minutely_emission,
        )
870411
def add_clock(self, timezone, color='lightgreen', show_seconds=None):
        
        if show_seconds is None:
            show_seconds = self.options.show_seconds

        clock = Clock(self.app, self.logger, timezone, color=color,
                      font=self.options.font, show_seconds=show_seconds)
        clock.widget.cfg_expand(0x7, 0x7)

        num_clocks = len(self.clocks)
        cols = self.settings.get('columns')
        row = num_clocks // cols
        col = num_clocks % cols
        self.clocks[timezone] = clock

        self.grid.add_widget(clock.widget, row, col, stretch=1)
341585
def check(self):
    

    if self.value is None:
      return True
    return (time.clock() - self.start) >= self.value
432917
private void set_time()
	{
		if (date == true)
		{		
			Date d = new Date();
			
			long nb_millisec = d.getTime();
	
			when.tv_sec = (int)(nb_millisec / 1000);
			when.tv_usec = (int)((nb_millisec - (when.tv_sec * 1000)) * 1000);
			when.tv_nsec = 0;
		}
	}
349841
function resetClock() {
  for (const key in jasmine.Clock.real) {
    if (jasmine.Clock.real.hasOwnProperty(key)) {
      window[key] = jasmine.Clock.real[key]
    }
  }
}
840366
def set_time(self, key_name, new_time):
        """"""
        self.unbake()
        kf = self.dct[key_name]
        kf['time'] = new_time
        self.bake()
1016617
def set_time_rate(self, value):
        '''
        
        '''
        if isinstance(value, float) is False:
            raise TypeError("The type of __time_rate must be float.")

        if value <= 0.0:
            raise ValueError("The value of __time_rate must be greater than 0.0")

        self.__time_rate = value
1293568
function(factory, time, options) {
			this.base(options);
			this.factory = factory;

			if(time) {
				this.time = time;
			}
		}
1104402
@VisibleForTesting
  void setNanoClock(NanoClock clock) {
    Preconditions.checkArgument(clock != null, "clock must not be null!");
    this.clock = clock;
  }
196412
def set_pwm_frequency(self, value):
        
        self.__check_range('pwm_frequency', value)
        reg_val = self.calc_pre_scale(value)
        logger.debug("Calculated prescale value is %s" % reg_val)
        self.sleep()
        self.write(Registers.PRE_SCALE, reg_val)
        self.wake()
24939
def on_origin(self, *args):
        """"""
        if self.origin is None:
            Clock.schedule_once(self.on_origin, 0)
            return
        self.origin.bind(
            pos=self._trigger_repoint,
            size=self._trigger_repoint
        )
838294
function createClock(timeColumn, tableStructure) {
  var availabilityCollection = new TimeIntervalCollection();
  timeColumn._timeIntervals
    .filter(function(availability) {
      return defined(availability && availability.start);
    })
    .forEach(function(availability) {
      availabilityCollection.addInterval(availability);
    });
  if (!defined(timeColumn._clock)) {
    if (
      availabilityCollection.length > 0 &&
      !availabilityCollection.start.equals(Iso8601.MINIMUM_VALUE)
    ) {
      var startTime = availabilityCollection.start;
      var stopTime = availabilityCollection.stop;
      var totalSeconds = JulianDate.secondsDifference(stopTime, startTime);
      var multiplier = Math.round(totalSeconds / 120.0);

      if (
        defined(tableStructure.idColumnNames) &&
        tableStructure.idColumnNames.length > 0
      ) {
        stopTime = timeColumn.julianDates.reduce((d1, d2) =>
          JulianDate.greaterThan(d1, d2) ? d1 : d2
        );
      }

      var clock = new DataSourceClock();
      clock.startTime = JulianDate.clone(startTime);
      clock.stopTime = JulianDate.clone(stopTime);
      clock.clockRange = ClockRange.LOOP_STOP;
      clock.multiplier = multiplier;
      clock.currentTime = JulianDate.clone(startTime);
      clock.clockStep = ClockStep.SYSTEM_CLOCK_MULTIPLIER;
      return clock;
    }
  }
  return timeColumn._clock;
}
366088
public static void setMinTime(int mintime) {
    System.setProperty(MIN_TIME, String.valueOf(mintime));
    TimerTrace.mintime = mintime;
  }
305973
private void checkForNight(final ZonedDateTime TIME) {
        int hour   = TIME.getHour();
        int minute = TIME.getMinute();

        if (0 <= hour && minute >= 0 && hour <= 5 && minute <= 59|| 17 <= hour && minute <= 59 && hour <= 23 && minute <= 59) {
            if(isNightMode()) return;
            setNightMode(true);
        } else {
            if (!isNightMode()) return;
            setNightMode(false);
        }
    }
858916
def set_value(self, value, status=Sensor.NOMINAL, timestamp=None):
        """"""
        if timestamp is None:
            timestamp = self._manager.time()
        self.set(timestamp, status, value)
1124626
def set(self, time, value, compact=False):
        
        if (len(self) == 0) or (not compact) or \
                (compact and self.get(time) != value):
            self._d[time] = value
652654
def sync_clock(self):
        
        self.send(velbus.SetRealtimeClock())
        self.send(velbus.SetDate())
        self.send(velbus.SetDaylightSaving())