Consumer for CaptureBuildStartTime. Gets the build start time.
976220
def consume(self, routingKey, msg):
        
        builder_info = yield self.master.data.get(("builders", msg['builderid']))
        if self._builder_name_matches(builder_info):
            try:
                ret_val = self._callback(*self._retValParams(msg))
            except Exception as e:
                # catching generic exceptions is okay here since we propagate
                # it
                raise CaptureCallbackError("%s Exception raised: %s with message: %s" %
                                           (self._err_msg(msg, builder_info['name']),
                                            type(e).__name__, str(e)))

            context = self._defaultContext(msg, builder_info['name'])
            post_data = {
                self._time_type: ret_val
            }
            series_name = "%s-build-times" % builder_info['name']
            yield self._store(post_data, series_name, context)

        else:
            yield defer.succeed(None)
1340284
public PeriodBuilder getPeriodBuilder() {
    if (builder == null) {
      builder = ps.newPeriodBuilderFactory()
          .setLocale(localeName)
          .setTimeZone(timeZone)
          .getSingleUnitBuilder();
    }
    return builder;
  }
600911
@Override
    public void beforeExecute(Task task) {
        initializeBuildMetrics();
        long now = clock.getCurrentTime();
        Project project = task.getProject();
        ProjectMetrics projectMetrics = buildMetrics.getProjectProfile(project.getPath());
        projectMetrics.getTaskProfile(task.getPath()).setStart(now);
    }
693312
private boolean tryLoadBuildProperties(Manifest manifest)
    {
        Attributes mainAttributes = manifest.getMainAttributes();
        String projectVersion = mainAttributes.getValue(PROJECT_VERSION_ATTRIBUTE);
        String time = mainAttributes.getValue(BUILD_TIME_ATTRIBUTE);

        if (projectVersion == null || time == null)
        {
            return false;
        }

        ourProjectVersion = projectVersion;

        try
        {
            ourBuildTime = Timestamp.valueOf(time);
        }
        catch (IllegalArgumentException e)
        {
            // Badly formatted timestamp. Ignore it.
        }
        return true;
    }
1278891
private void startPerformanceSnapshot() {
        // Create new snapshot
        mPerfSnapshot = new Bundle();

        // Add initial binder counts
        Bundle binderCounts = getBinderCounts();
        for (String key : binderCounts.keySet()) {
            mPerfSnapshot.putLong("pre_" + key, binderCounts.getLong(key));
        }

        // Force a GC and zero out the performance counters. Do this
        // before reading initial CPU/wall-clock times so we don't include
        // the cost of this setup in our final metrics.
        startAllocCounting();

        // Record CPU time up to this point, and start timing. Note: this
        // must happen at the end of this method, otherwise the timing will
        // include noise.
        mSnapshotExecTime = SystemClock.uptimeMillis();
        mSnapshotCpuTime = Process.getElapsedCpuTime();
    }
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)
503709
def _getMyFirstDatetimeFrom(self):
        
        myStartDt = getAwareDatetime(self.repeat.dtstart, None,
                                     self.tz, dt.time.min)
        return self.__after(myStartDt, excludeCancellations=False)
904665
def build_duration(self):
        """"""

        return int(self.state.build_done) - int(self.state.build)
577710
public long getStartTick()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getStateTick");

    long startTick = getTickRange().startstamp;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getStartTick", new Long(startTick));
      
    return startTick;
  }
236275
def get_start_time_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['start_time'])
        metadata.update({'existing_date_time_values': self._my_map['startTime']})
        return Metadata(**metadata)
258995
public long getStartTime(List<IInvokedMethod> methods)
    {
        long startTime = System.currentTimeMillis();
        for (IInvokedMethod method : methods)
        {
            startTime = Math.min(startTime, method.getDate());
        }
        return startTime;
    }
115028
def build(self, builder):
        
        builder.start("DateTimeStamp", {})
        if isinstance(self.date_time, datetime):
            builder.data(dt_to_iso8601(self.date_time))
        else:
            builder.data(self.date_time)
        builder.end("DateTimeStamp")
182700
public function findOneForHubIdAndStartTime($hub_id, $start_time)
    {
        $qb = $this->getEntityManager()->createQueryBuilder()
            ->from('HarvestCloudCoreBundle:SellerWindow', 'pw')
            ->select('pw')
            ->where('pw.start_time = :start_time')
            ->andWhere('pw.start_time > :now')
            ->setParameter('start_time', date('Y-m-d H:i:s', $start_time))
            ->setParameter('now', date('Y-m-d H:i:s'))
        ;

        $q = $qb->getQuery();

        return $q->getOneOrNullResult();
    }
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(' ')))
1266549
@WithBridgeMethods(List.class)
    @Deprecated
    public RunList<RunT> getBuildsByTimestamp(long start, long end) {
        return getBuilds().byTimestamp(start,end);
    }
549362
def start_capture(self, data_link_type="DLT_EN10MB", capture_file_name=None):
        

        self._capturing = True
        self._capture_file_name = capture_file_name
        self._streaming_pcap = asyncio.async(self._start_streaming_pcap())
        self._project.controller.notification.emit("link.updated", self.__json__())
601896
public void watchStartup(int startingTimeout, int startupTimeout)
            throws Exception {

        // use this for timeout checks later
        long startTime = System.currentTimeMillis();

        ServerStatusMessage[] messages = getAllMessages();

        ServerStatusMessage lastMessage = messages[messages.length - 1];

        boolean starting = false;
        boolean started = false;
        while (!started) {

            showStartup(messages);

            // update started and starting flags, and
            // throw a startup exception if startup failed
            // is encountered
            for (ServerStatusMessage element : messages) {
                ServerState state = element.getState();
                if (state == ServerState.STARTING) {
                    starting = true;
                } else if (state == ServerState.STARTED) {
                    started = true;
                } else if (state == ServerState.STARTUP_FAILED) {
                    throw new Exception("Fedora startup failed (see above)");
                }
            }

            if (!started) {

                // wait half a second
                try {
                    Thread.sleep(500);
                } catch (Throwable th) {
                }

                // throw an exception if either timeout has been
                // exceeded
                long now = System.currentTimeMillis();
                if (!starting) {
                    if ((now - startTime) / 1000 > startingTimeout) {
                        throw new Exception("Server startup did not begin within "
                                + startingTimeout + " seconds");
                    }
                }
                if ((now - startTime) / 1000 > startupTimeout) {
                    throw new Exception("Server startup did not complete within "
                            + startupTimeout + " seconds");
                }

                // get next batch of messages
                messages = _statusFile.getMessages(lastMessage);
                if (messages.length > 0) {
                    lastMessage = messages[messages.length - 1];
                }
            }

        }

    }