Returns true if the Guava service entered the RUNNING state within the specified time period.
507508
private boolean awaitRunning(Service service, long timeoutAt) {
        if (service.isRunning()) {
            return true;
        }
        long waitMillis = timeoutAt - System.currentTimeMillis();
        if (waitMillis <= 0) {
            return false;
        }
        try {
            service.start().get(waitMillis, TimeUnit.MILLISECONDS);
        } catch (Exception e) {
            // Fall through
        }
        return service.isRunning();
    }
65344
public synchronized boolean detectRestart() {
    if (this.state.hasNotRestarted()) {
      resubmissionAttempts = driverRuntimeRestartManager.getResubmissionAttempts();

      if (resubmissionAttempts > 0) {
        // set the state machine in motion.
        this.state = DriverRestartState.BEGAN;
      }
    }

    return this.state.hasRestarted();
  }
699811
private boolean isFresh(Record record) {
    double period = record.data.getMetaInfo().getFreshnessPeriod();
    return period < 0 || record.addedAt + (long) period > System.currentTimeMillis();
  }
1255465
private boolean isTypedTimeFullyLegal() {
        if (mIs24HourMode) {
            // For 24-hour mode, the time is legal if the hours and minutes are each legal. Note:
            // getEnteredTime() will ONLY call isTypedTimeFullyLegal() when NOT in 24hour mode.
            int[] values = getEnteredTime(null);
            return (values[0] >= 0 && values[1] >= 0 && values[1] < 60);
        } else {
            // For AM/PM mode, the time is legal if it contains an AM or PM, as those can only be
            // legally added at specific times based on the tree's algorithm.
            return (mTypedTimes.contains(getAmOrPmKeyCode(AM)) ||
                    mTypedTimes.contains(getAmOrPmKeyCode(PM)));
        }
    }
1141788
def _service_heartbeat_if_due(self):
        ''''''
        due = False
        if self._service_registry:
            if not hasattr(self, "status_info"):
                due = True
            else:
                d = doublethink.utcnow() - self.status_info["last_heartbeat"]
                due = d.total_seconds() > self.HEARTBEAT_INTERVAL

        if due:
            self._service_heartbeat()
1313604
async function isRunning(address) {
	try {
		await call(address, {
			url: '/gateway',
			timeout: 6e5, // 10 minutes
		})
		return true
	} catch (e) {
		return false
	}
}
85202
public void setBackgroundPeriod(long period)
  {
    if (period < 1) {
      throw new ConfigException(L.l("profile period '{0}ms' is too small.  The period must be greater than 10ms.",
                                    period));
    }

    _profilerService.setBackgroundInterval(period, TimeUnit.MILLISECONDS);
  }
100466
def is_running(self, submissionid, user_check=True):
        
        submission = self.get_submission(submissionid, user_check)
        return submission["status"] == "waiting"
1060565
private boolean executionIsTimedOut(long aStartTime, int aTimeout) {
        if (aTimeout != 0) {
            long now = System.currentTimeMillis() / 1000;
            if ((now - aStartTime) >= aTimeout) {
                return true;
            }
        }
        return false;
    }
105308
def is_running(self):
        
        return self._process.state() in [self._process.Running, self._process.Starting]
643024
def _check_time_range(time_range, now):
    '''
    
    '''
    if _TIME_SUPPORTED:
        _start = dateutil_parser.parse(time_range['start'])
        _end = dateutil_parser.parse(time_range['end'])

        return bool(_start <= now <= _end)
    else:
        log.error('Dateutil is required.')
        return False
1195912
def is_period_current(self):
		

		return self.current_period_end > timezone.now() or (
			self.trial_end and self.trial_end > timezone.now()
		)
1033070
def check_time_period(self, ds):
        
        start = self.std_check(ds, 'time_coverage_start')
        end = self.std_check(ds, 'time_coverage_end')

        msgs = []
        count = 2
        if not start:
            count -= 1
            msgs.append("Attr 'time_coverage_start' is missing")
        if not end:
            count -= 1
            msgs.append("Attr 'time_coverage_end' is missing")

        return Result(BaseCheck.HIGH, (count, 2), 'time coverage start/end', msgs)
59696
boolean hasValidTimes() {

        if ((getEnd() > 0L) && (getEnd() < System.currentTimeMillis())) {
            return false;
        }

        return ((getEnd() == 0) | (getStart() == 0)) || (getEnd() >= getStart());
    }
900030
def _is_ready(self, as_of):
        
        if self.is_one_off():
            return self.initial_billing_cycle.date_range.lower <= as_of
        else:
            return True
68414
def is_active(self, timperiods):
        
        now = int(time.time())
        timperiod = timperiods[self.modulation_period]
        if not timperiod or timperiod.is_time_valid(now):
            return True
        return False
8776
private boolean isTypedTimeFullyLegal() {
        if (mIs24HourMode) {
            // For 24-hour mode, the time is legal if the hours and minutes are each legal. Note:
            // getEnteredTime() will ONLY call isTypedTimeFullyLegal() when NOT in 24hour mode.
            Boolean[] enteredZeros = {false, false, false};
            int[] values = getEnteredTime(enteredZeros);
            return (values[0] >= 0 && values[1] >= 0 && values[1] < 60 && values[2] >= 0 && values[2] < 60);
        } else {
            // For AM/PM mode, the time is legal if it contains an AM or PM, as those can only be
            // legally added at specific times based on the tree's algorithm.
            return (mTypedTimes.contains(getAmOrPmKeyCode(AM)) ||
                    mTypedTimes.contains(getAmOrPmKeyCode(PM)));
        }
    }