Applies the correct time index to configurations
512506
def apply_time_to_configurations(self, configurations, data):
        """"""

        time_value = None
        if data.get('time'):
            time_value = data['time']

            # Only single time values are supported. For extents, just grab the first value
            if isinstance(data['time'], (tuple, list)):
                time_value = time_value[0]

        if time_value:
            for config in configurations:
                config.set_time_index_from_datetime(time_value, best_fit=ALLOW_BEST_FIT_TIME_INDEX)

        return configurations
425632
private void setItem(int index, Timepoint time) {
        time = roundToValidTime(time, index);
        mCurrentTime = time;
        reselectSelector(time, false, index);
    }
753164
def _update_widgets(self):
        ''

        self._time_sensitive = any(getattr(w, 'TIME_SENSITIVE', False)
                                    for w in self.widgets)
1150906
def update_index(entries):
    
    context = GLOBAL_TEMPLATE_CONTEXT.copy()
    context['entries'] = entries
    context['last_build'] = datetime.datetime.now().strftime(
        "%Y-%m-%dT%H:%M:%SZ")

    list(map(lambda x: _render(context, x[0],
                               os.path.join(CONFIG['output_to'], x[1])),
             (('entry_index.html', 'index.html'), ('atom.xml', 'atom.xml'))))
677847
def _blackbox_time(time_scale, blackbox, system):
        """"""
        blackbox = blackbox.reindex()

        tpm = run_tpm(system, time_scale, blackbox)

        # Universal connectivity, for now.
        n = len(system.node_indices)
        cm = np.ones((n, n))

        return SystemAttrs(tpm, cm, system.node_indices, system.state)
729812
def _apply_all_time_reductions(self, data):
        """"""
        logging.info(self._print_verbose("Applying desired time-"
                                         "reduction methods."))
        reduc_specs = [r.split('.') for r in self.dtype_out_time]
        reduced = {}
        for reduc, specs in zip(self.dtype_out_time, reduc_specs):
            func = specs[-1]
            if 'reg' in specs:
                reduced.update({reduc: self.region_calcs(data, func)})
            else:
                reduced.update({reduc: self._time_reduce(data, func)})
        return OrderedDict(sorted(reduced.items(), key=lambda t: t[0]))
1172363
@Override
    public void setTime(int parameterIndex, Time x) throws SQLException {
        internalStmt.setTime(parameterIndex, x);
    }
1074858
private Set<Integer> findExpiredIndexesBeforeIndex(int index) {
		long indexTime = getLineTime(index);
		Set<Integer> removeThese = Sets.newHashSet();
		for (int i = index - 1; i >= 0; i--) {
			if (indexTime - getLineTime(i) > MAXIMUM_ARRIVAL_TIME_DIFFERENCE_MS) {
				listener.timestampNotFound(getLine(i), getLineTime(i));
				removeThese.add(i);
			}
		}
		return removeThese;
	}
795593
public void setTimewarpInt(String timewarp) {

        try {
            m_userSettings.setTimeWarp(Long.valueOf(timewarp).longValue());
        } catch (Exception e) {
            m_userSettings.setTimeWarp(-1);
        }
    }
323057
def _GetLoadConfigTimestamp(self, pefile_object):
    
    if not hasattr(pefile_object, 'DIRECTORY_ENTRY_LOAD_CONFIG'):
      return None
    timestamp = getattr(
        pefile_object.DIRECTORY_ENTRY_LOAD_CONFIG.struct, 'TimeDateStamp', 0)
    return timestamp
569547
def modification_time(self):
    """"""
    if self._stat_info is None:
      return None

    timestamp = int(self._stat_info.st_mtime)
    return dfdatetime_posix_time.PosixTime(timestamp=timestamp)
355012
def modification_time(self):
    """"""
    timestamp = self._fsntfs_attribute.get_modification_time_as_integer()
    return dfdatetime_filetime.Filetime(timestamp=timestamp)
679672
def _every(times, step_size, index):
        
        current = index * step_size
        step = current // times * times
        reached = current >= step
        overshot = current >= step + step_size
        return current and reached and not overshot
1172957
void tick(long index, long timestamp) {
    // Only create an iterator if there are actually tasks scheduled.
    if (!scheduledTasks.isEmpty()) {

      // Iterate through scheduled tasks until we reach a task that has not met its scheduled time.
      // The tasks list is sorted by time on insertion.
      Iterator<ServerScheduledTask> iterator = scheduledTasks.iterator();
      while (iterator.hasNext()) {
        ServerScheduledTask task = iterator.next();
        if (task.complete(timestamp)) {
          context.update(index, Instant.ofEpochMilli(task.time), ServerStateMachineContext.Type.COMMAND);
          task.execute();
          complete.add(task);
          iterator.remove();
        } else {
          break;
        }
      }

      // Iterate through tasks that were completed and reschedule them.
      for (ServerScheduledTask task : complete) {
        task.reschedule();
      }
      complete.clear();
    }
  }
1207534
def set_time(self, time):
        '''
        
        '''
        times = num2date(time[:].squeeze(), time.units)
        self.time = pd.DatetimeIndex(pd.Series(times), tz=self.location.tz)
925201
private long computeConfigurationLastModified(List<Resource> configurations) {
        long result = 0;
        for (Resource configuration : configurations) {
        	try {
                long currentConfigurationLastModified = configuration.lastModified();
                if (currentConfigurationLastModified > result) {
                    result = currentConfigurationLastModified;
                }
            } catch (IOException ioex) {
                logger.warn("Error while reading last configuration modification date.", ioex);
            }
        }
        return result;
    }
940551
def index(in_bam, config, check_timestamp=True):
    
    assert is_bam(in_bam), "%s in not a BAM file" % in_bam
    index_file = "%s.bai" % in_bam
    alt_index_file = "%s.bai" % os.path.splitext(in_bam)[0]
    if check_timestamp:
        bai_exists = utils.file_uptodate(index_file, in_bam) or utils.file_uptodate(alt_index_file, in_bam)
    else:
        bai_exists = utils.file_exists(index_file) or utils.file_exists(alt_index_file)
    if not bai_exists:
        # Remove old index files and re-run to prevent linking into tx directory
        for fname in [index_file, alt_index_file]:
            utils.remove_safe(fname)
        samtools = config_utils.get_program("samtools", config)
        num_cores = config["algorithm"].get("num_cores", 1)
        with file_transaction(config, index_file) as tx_index_file:
            cmd = "{samtools} index -@ {num_cores} {in_bam} {tx_index_file}"
            do.run(cmd.format(**locals()), "Index BAM file: %s" % os.path.basename(in_bam))
    return index_file if utils.file_exists(index_file) else alt_index_file