Add sync times to the buffer.
492990
String getSyncTimes() {
    StringBuilder buf = new StringBuilder();
    for (JournalAndStream jas : journals) {
      if (jas.isActive()) {
        buf.append(jas.getCurrentStream().getTotalSyncTime());
        buf.append(" ");
      }
    }
    return buf.toString();
  }
707628
public void update(VectorClock<T> clock) {
    for (VectorTimestamp<T> timestamp : clock.vector.values()) {
      update(timestamp);
    }
  }
110019
private void advanceTime(NFAState nfaState, long timestamp) throws Exception {
		try (SharedBufferAccessor<IN> sharedBufferAccessor = partialMatches.getAccessor()) {
			Collection<Tuple2<Map<String, List<IN>>, Long>> timedOut =
					nfa.advanceTime(sharedBufferAccessor, nfaState, timestamp);
			if (!timedOut.isEmpty()) {
				processTimedOutSequences(timedOut);
			}
		}
	}
1265539
def add_seq(self, seq):
        """"""
        self.buffer.append(seq)
        self.buf_count += 1
        if self.buf_count % self.buffer_size == 0: self.flush()
247662
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! $this->isDirty(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }

        if (! $this->exists && ! $this->isDirty(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }
857994
def fill_buffer(heap_data, i_chan):
        
        # Calculate the time count and fraction.
        now = datetime.datetime.utcnow()
        time_full = now.timestamp()
        time_count = int(time_full)
        time_fraction = int((time_full - time_count) * (2**32 - 1))
        diff = now - (now.replace(hour=0, minute=0, second=0, microsecond=0))
        time_data = diff.seconds + 1e-6 * diff.microseconds

        # Write the data into the buffer.
        heap_data['visibility_timestamp_count'] = time_count
        heap_data['visibility_timestamp_fraction'] = time_fraction
        heap_data['correlator_output_data']['VIS'][:][:] = \
            time_data + i_chan * 1j
1088819
def add(self, index):
        
        if (index - self.flush_at) < self.interval:
            return
        now = time.time()
        elapsed = now - self.lap
        elapsed_total = now - self.start
        it = index - self.flush_at
        self.lap = now
        if self.verbose:
            logger.info("iter={} {{{}}}={}[sec/{}iter] {}[sec]".format(
                index, self.name, elapsed, it, elapsed_total))
        if self.fd is not None:
            print("{} {} {} {}".format(index, elapsed,
                                       it, elapsed_total), file=self.fd)
        self.flush_at = index
1027352
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! is_null(static::UPDATED_AT) && ! $this->hasChanged(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }

        if (! $this->exists && ! is_null(static::CREATED_AT) &&
            ! $this->hasChanged(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }
1078472
def add_time(self, extra_time):
        """"""
        window_start = self.parent.value('window_start') + extra_time
        self.parent.overview.update_position(window_start)
1190965
def synchronize_clock(self, offset):
        

        self.time_offset = offset - self.uptime
        self.is_utc = True

        if self.has_rtc:
            self.stored_offset = self.time_offset
41197
public static void addModificationTimeToAttributes(Map<String, byte[]> attributes, Clock clock) {
    attributes.put(FILE_MODIFICATION_TIMESTAMP_KEY, Longs.toByteArray(clock.currentTimeMillis()));
  }
444825
def synchronize (lock, func, log_duration_secs=0):
    """"""
    def newfunc (*args, **kwargs):
        """Execute function synchronized."""
        t = time.time()
        with lock:
            duration = time.time() - t
            if duration > log_duration_secs > 0:
                print("WARN:", func.__name__, "locking took %0.2f seconds" % duration, file=sys.stderr)
            return func(*args, **kwargs)
    return update_func_meta(newfunc, func)
740321
def sync(self, bForce):
        """"""

        fn = self.function_table.sync
        peError = EVRSettingsError()
        result = fn(bForce, byref(peError))
        return result, peError
982838
def add!(timings)
      timings.descriptions.each{|d|
        add_cpu_time(d, timings.cpu_time(d))
        add_wall_time(d, timings.wall_time(d))
      }
    end
296054
def enable_writes(self):
        """"""
        self.write_buffer = []
        self.flush_lock = threading.RLock()
        self.flush_thread = FlushThread(self.max_batch_time,
                                        self._flush_writes)
239409
final public void add(long curTime, long val) {
        if (!enabled)
            return;

        lastSampleTime = curTime;
        if (!sync) {
            if (val > max)
                max = val;

            if (count > 0) {
                if (val < min)
                    min = val;
            } else
                min = val; //set min=val for the first time

            /*
             * if (val < min || min < 0)
             * min = val;
             */
            count++;
            total += val;
            sumOfSquares += val * val;
        } else {
            // synchronized ONLY the count updates
            synchronized (this) {
                count++;
                total += val;
            }

            if (val > max)
                max = val;

            if (count > 0) {
                if (val < min)
                    min = val;
            } else
                min = val; //set min=val for the first time

            sumOfSquares += val * val;
        }
    }
480289
def sync_in_files(self, force=False):
        """"""
        self.log('---- Sync Files ----')

        self.dstate = self.STATES.BUILDING

        for f in self.build_source_files:

            if self.source_fs.exists(f.record.path):
                # print f.path, f.fs_modtime, f.record.modified, f.record.source_hash, f.fs_hash
                if f.fs_is_newer or force:
                    self.log('Sync: {}'.format(f.record.path))
                    f.fs_to_record()

        self.commit()