Prepares window if any is specified.
        :param start_time: The anchor block start_time from where the window
        should be generated.
341282
def _prepare_window(self, start_time: datetime) -> None:
        
        # evaluate window first which sets the correct window in the store
        store = self._schema.schema_loader.get_store(
            self._schema.source.store_schema.fully_qualified_name)
        if Type.is_type_equal(self._schema.window_type, Type.DAY) or Type.is_type_equal(
                self._schema.window_type, Type.HOUR):
            block_list = self._load_blocks(
                store.get_range(
                    Key(self._schema.source.key_type, self._identity, self._schema.source.name),
                    start_time, self._get_end_time(start_time)))
        else:
            block_list = self._load_blocks(
                store.get_range(
                    Key(self._schema.source.key_type, self._identity, self._schema.source.name),
                    start_time, None, self._schema.window_value))

        self._window_source = _WindowSource(block_list)
        self._validate_view()
1241123
def start_datetime(self) -> Optional[datetime.datetime]:
        
        if not self.intervals:
            return None
        return self.intervals[0].start
575714
def execution_time(object):
    

    @functools.wraps(object)
    def execution_time_wrapper(*args, **kwargs):
        """
        Implements execution timing.

        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Object.
        :rtype: object
        """

        start_time = time.time()

        value = object(*args, **kwargs)

        end_time = time.time()

        sys.stdout.write("{0} | '{1}' object processed during '{2:f}' ms!\n".format(__name__,
                                                                                    object.__name__,
                                                                                    (end_time - start_time) * 1000.0))

        return value

    return execution_time_wrapper
986724
def started(self):
        
        statistics = self._properties.get("statistics")
        if statistics is not None:
            millis = statistics.get("startTime")
            if millis is not None:
                return _helpers._datetime_from_microseconds(millis * 1000.0)
795988
def set_start(self,time,pass_to_command_line=True):
    
    if pass_to_command_line:
      self.add_var_opt('gps-start-time',time)
    self.__start = time
    self.__data_start = time
776721
def start(check_time: int = 500) -> None:
    
    io_loop = ioloop.IOLoop.current()
    if io_loop in _io_loops:
        return
    _io_loops[io_loop] = True
    if len(_io_loops) > 1:
        gen_log.warning("tornado.autoreload started more than once in the same process")
    modify_times = {}  # type: Dict[str, float]
    callback = functools.partial(_reload_on_update, modify_times)
    scheduler = ioloop.PeriodicCallback(callback, check_time)
    scheduler.start()
1115901
def prepare
      started_at = DateTime.now.to_s
      prepare_deploy
      prepare_common_installation
      puppet_installation
      create_prepare_checkpoint(started_at)
    end
1308107
def get_start_time(self):
        
        # Implemented from template for osid.assessment.AssessmentOffered.get_start_time_template
        if not bool(self._my_map['startTime']):
            raise errors.IllegalState()
        dt = self._my_map['startTime']
        return DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond)
496280
def start(self, duration=None):
        
        if duration is None:
            duration = self.duration

        self.set(duration)
185417
def start_date(self) -> Optional[datetime.date]:
        
        if not self.intervals:
            return None
        return self.start_datetime().date()
1019963
def task_start_time(self):
        
        return datetime.time(
            self.task_start_parameters[
                ATTR_SMART_TASK_TRIGGER_TIME_START_HOUR],
            self.task_start_parameters[
                ATTR_SMART_TASK_TRIGGER_TIME_START_MIN])
254454
def run_example(example_cls: Example, args=None):
    
    values = parse_args(args)
    window_cls = get_window_cls(values.window)

    window = window_cls(
        title=example_cls.title,
        size=example_cls.window_size,
        fullscreen=values.fullscreen,
        resizable=example_cls.resizable,
        gl_version=example_cls.gl_version,
        aspect_ratio=example_cls.aspect_ratio,
        vsync=values.vsync,
        samples=values.samples,
        cursor=values.cursor,
    )

    window.example = example_cls(ctx=window.ctx, wnd=window)

    start_time = time.time()
    current_time = start_time
    prev_time = start_time
    frame_time = 0

    while not window.is_closing:
        current_time, prev_time = time.time(), current_time
        frame_time = max(current_time - prev_time, 1 / 1000)

        window.render(current_time - start_time, frame_time)
        window.swap_buffers()

    duration = time.time() - start_time
    window.destroy()
    print("Duration: {0:.2f}s @ {1:.2f} FPS".format(duration, window.frames / duration))
1174696
static function setScriptStart( $time = false )
    {
        if ( $time == false )
            $time = microtime( true );
        $debug = eZDebug::instance();
        $debug->ScriptStart = $time;
    }
687297
def set_beginTimestamp(self,btimestamp=None):
        
        if btimestamp is None:
            import time
            btimestamp = time.strftime('%Y-%m-%dT%H:%M:%S%Z')
        self.node.set('beginTimestamp',btimestamp)
668298
def set_dimmer_start_time(self, hour, minute):
        
        #  This is to calculate the difference between local time
        #  and the time in the gateway
        d1 = self._gateway.get_gateway_info().current_time
        d2 = dt.utcnow()
        diff = d1 - d2
        newtime = dt(100, 1, 1, hour, minute, 00) - diff

        command = {
            ATTR_SMART_TASK_TRIGGER_TIME_INTERVAL:
                [{
                    ATTR_SMART_TASK_TRIGGER_TIME_START_HOUR: newtime.hour,
                    ATTR_SMART_TASK_TRIGGER_TIME_START_MIN: newtime.minute
                }]
            }
        return self._task.set_values(command)
920542
def start(self, timeout=None):
        """"""

        self.thread.start()
        start_time = time.time()
        if not timeout:
            timeout = self.timeout
        # every second, check the condition of the thread and return
        # control to the user if appropriate
        while start_time + timeout > time.time():
            self.thread.join(1)
            if self.started:
                return True
            if self.error:
                return False
        return False
604529
def output_start_time(self, start_time_msec):
        '''
        '''
        self.log.write("#[StartTime: %f (seconds since epoch), %s]\n" %
                       (float(start_time_msec) / 1000.0,
                        datetime.fromtimestamp(start_time_msec).iso_format(' ')))