Make sure that the start time doesn't come before the active entry
503511
def clean_start_time(self):
        
        start = self.cleaned_data.get('start_time')
        if not start:
            return start
        active_entries = self.user.timepiece_entries.filter(
            start_time__gte=start, end_time__isnull=True)
        for entry in active_entries:
            output = ('The start time is on or before the current entry: '
                      '%s - %s starting at %s' % (entry.project, entry.activity,
                                                  entry.start_time.strftime('%H:%M:%S')))
            raise forms.ValidationError(output)
        return start
278914
@Override
  public void setStartTime(Date startTime) {

    if (startTime == null) {
      throw new IllegalArgumentException("Start time cannot be null");
    }

    Date eTime = getEndTime();
    if (eTime != null && startTime != null && eTime.before(startTime)) {
      throw new IllegalArgumentException("End time cannot be before start time");
    }

    this.startTime = startTime;
  }
251320
def _AddStopTimeObjectUnordered(self, stoptime, schedule):
    """"""
    stop_time_class = self.GetGtfsFactory().StopTime
    cursor = schedule._connection.cursor()
    insert_query = "INSERT INTO stop_times (%s) VALUES (%s);" % (
       ','.join(stop_time_class._SQL_FIELD_NAMES),
       ','.join(['?'] * len(stop_time_class._SQL_FIELD_NAMES)))
    cursor = schedule._connection.cursor()
    cursor.execute(
        insert_query, stoptime.GetSqlValuesTuple(self.trip_id))
616074
def enter(self, delay, priority, action, argument=(), kwargs=_sentinel):
        
        time = self.timefunc() + delay
        return self.enterabs(time, priority, action, argument, kwargs)
858138
def init(self):
        '''
        
        '''
        self.previous_value = None
        self.last_update_time = None
        self.start_time = None
        self.updates = 0
        self.end_time = None
        self.extra = dict()
        self._last_update_timer = timeit.default_timer()
1232366
def before_run(self):
        """"""
        # Actions and checks counters
        self.nb_checks = 0
        self.nb_internal_checks = 0
        self.nb_checks_launched = 0
        self.nb_actions_launched = 0

        self.nb_checks_results = 0
        self.nb_checks_results_timeout = 0
        self.nb_checks_results_passive = 0
        self.nb_checks_results_active = 0

        self.nb_actions_results = 0
        self.nb_actions_results_timeout = 0
        self.nb_actions_results_passive = 0

        self.nb_broks_dropped = 0
        self.nb_checks_dropped = 0
        self.nb_actions_dropped = 0

        # Broks, notifications, ... counters
        self.nb_broks = 0
        self.nb_notifications = 0
        self.nb_event_handlers = 0
        self.nb_external_commands = 0

        self.ticks = 0
975037
def set_start(self,t):
    
    self.__dur += self.__start - t
    self.__start = t
29353
def GetStartTime(self, problems=problems_module.default_problem_reporter):
    """"""
    cursor = self._schedule._connection.cursor()
    cursor.execute(
        'SELECT arrival_secs,departure_secs FROM stop_times WHERE '
        'trip_id=? ORDER BY stop_sequence LIMIT 1', (self.trip_id,))
    (arrival_secs, departure_secs) = cursor.fetchone()
    if arrival_secs != None:
      return arrival_secs
    elif departure_secs != None:
      return departure_secs
    else:
      problems.InvalidValue('departure_time', '',
                            'The first stop_time in trip %s is missing '
                            'times.' % self.trip_id)
794396
public void setStartTime(com.google.api.ads.admanager.axis.v201811.DateTime startTime) {
        this.startTime = startTime;
    }
694959
def get_active_entry(user, select_for_update=False):
    """"""
    entries = apps.get_model('entries', 'Entry').no_join
    if select_for_update:
        entries = entries.select_for_update()
    entries = entries.filter(user=user, end_time__isnull=True)

    if not entries.exists():
        return None
    if entries.count() > 1:
        raise ActiveEntryError('Only one active entry is allowed.')
    return entries[0]
222547
def start(self):
        """"""
        if self._properties.get("startMs") is None:
            return None
        return _helpers._datetime_from_microseconds(
            int(self._properties.get("startMs")) * 1000.0
        )
1299671
public void beforeRecover() {
		if (data.getPeriod() > 0) {			
			final long now = System.currentTimeMillis();
			long startTime = data.getStartTime();
			while(startTime <= now) {
				startTime += data.getPeriod();
				data.setStartTime(startTime);				
			}			
			if (logger.isDebugEnabled()) {
				logger.debug("Task with id "
						+ data.getTaskID() + " start time reset to " + data.getStartTime());
			}
		}
	}
73591
function() {

		var time = new Date().getTime(),
			i = 0,
			count = this._active_tasks.length,
			task,
			active_tasks = [];

		for (; i < count; i++) {

			task = this._active_tasks[i];

			if (task.isRunning()) {
				task.onTimer(time);
				// note: at this moment task may be already off, but it's not checked - to save processor resources.
				active_tasks.push(task);
			}

		}

		if (!active_tasks.length) {

			this.is_running = false;

		}

		this._active_tasks = active_tasks;

	}
1285020
public void recordStartTime() {
        PreferenceManager.getDefaultSharedPreferences(BlockCanaryContext.get().provideContext())
                .edit()
                .putLong("BlockCanary_StartTime", System.currentTimeMillis())
                .commit();
    }
537987
public void setActive(boolean active) {
        super.setActive(active);
        if (active) {
            this.start = new AtomicLong(System.currentTimeMillis());
        } else {
            this.start =new AtomicLong( -1);
        }
    }
641033
def start(self):
        

        while not self.is_start(self.current_tag):
            self.next()
        self.new_entry()
184806
def _before_valid_time_range(self):
        
        if self.start_time is not None:
            try:
                if self.time < self.start_time:
                    return True
            except TypeError:
                return False
        return False