Inject a local variable containing timestamp at method entry
963383
protected void injectMethodTimer() {
        methodEntertime = newLocal(Type.LONG_TYPE);
        invokeStatic(Type.getType(System.class), Method.getMethod(CURRENT_TIME_MILLIS_METHODNAME));
        storeLocal(methodEntertime);

        /*
         * Inject debug information
         */
        if (Agent.debug) {
            getStatic(Type.getType(System.class), "err", Type.getType(PrintStream.class));
            push("Javametrics: Calling instrumented method: " + className + "." + methodName);
            invokeVirtual(Type.getType(PrintStream.class), Method.getMethod("void println(java.lang.String)"));
        }
    }
1005273
@SuppressWarnings("HiddenField")
  public BaseWindowedBolt withTimestampExtractor(TimestampExtractor timestampExtractor) {
    if (this.timestampExtractor != null) {
      throw new IllegalArgumentException(
          "Window is already configured with a timestamp extractor: " + timestampExtractor);
    }

    this.timestampExtractor = new org.apache.heron.api.windowing.TimestampExtractor() {

      @Override
      public long extractTimestamp(Tuple tuple) {
        return timestampExtractor.extractTimestamp(new TupleImpl(tuple));
      }
    };
    return this;
  }
680462
protected void applyTimestamps(ContentStream content, File localFile) {
        FileTime createTime =
            convertDateToFileTime(content.getDateCreated());
        FileTime lastAccessTime =
            convertDateToFileTime(content.getDateLastAccessed());
        FileTime lastModTime =
            convertDateToFileTime(content.getDateLastModified());

        BasicFileAttributeView fileAttributeView =
            Files.getFileAttributeView(localFile.toPath(),
                                       BasicFileAttributeView.class,
                                       LinkOption.NOFOLLOW_LINKS);
        // If any time value is null, that value is left unchanged
        try {
            fileAttributeView.setTimes(lastModTime, lastAccessTime, createTime);
        } catch (IOException e) {
            logger.error("Error setting timestamps for local file " +
                         localFile.getAbsolutePath() + ": " + e.getMessage(),
                         e);
        }
    }
1318112
function _wrapScheduleMethods(method){
	return function(value, time){
		time = this.toSeconds(time);
		method.apply(this, arguments);
		var event = this._events.get(time);
		var previousEvent = this._events.previousEvent(event);
		var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time);
		event.ticks = Math.max(ticksUntilTime, 0);
		return this;
	};
}
430293
def pass_local_client(
    method=None,
    clean=None,
    up_to_date=None,
    commit=None,
    ignore_std_streams=True,
    lock=None,
):
    """"""
    if method is None:
        return functools.partial(
            pass_local_client,
            clean=clean,
            up_to_date=up_to_date,
            commit=commit,
            ignore_std_streams=ignore_std_streams,
            lock=lock,
        )

    def new_func(*args, **kwargs):
        ctx = click.get_current_context()
        client = ctx.ensure_object(LocalClient)
        stack = contextlib.ExitStack()

        # Handle --isolation option:
        if get_git_isolation():
            client = stack.enter_context(client.worktree())

        transaction = client.transaction(
            clean=clean,
            up_to_date=up_to_date,
            commit=commit,
            ignore_std_streams=ignore_std_streams
        )
        stack.enter_context(transaction)

        if lock or (lock is None and commit):
            stack.enter_context(client.lock)

        with stack:
            result = ctx.invoke(method, client, *args, **kwargs)
        return result

    return functools.update_wrapper(new_func, method)
369989
def wrap(self, value, timestamp=None):
        
        if isinstance(value, Value):
            return value
        elif isinstance(value, ntwrappercommon):
            return value.raw
        elif isinstance(value, dict):
            return self.Value(self.type, value)
        else:
            S, NS = divmod(float(timestamp or time.time()), 1.0)
            return self.Value(self.type, {
                'value': value,
                'timeStamp': {
                    'secondsPastEpoch': S,
                    'nanoseconds': NS * 1e9,
                },
            })
5750
def _serialize(self, value, attr, obj, **kwargs):
        """"""
        if value is None:
            return None

        return int(datetime_to_timestamp(value))
1022557
def x_build_timestamp( self, node ):
        '''
        
        '''
        self.timestamps.append(self.get_data(node).strip())
        return None
50936
public void add(long timestamp, T object) {
		JMMap.getOrPutGetNew(this.timeSeriesMap, buildKeyTimestamp(timestamp),
				ArrayList::new).add(object);
	}
773532
@Override
    public void setTimestamp(String parameterName, Timestamp x) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
428280
private Timestamp convertFieldValueToTimestamp(final Field field,
                                                   final ExportContainer exportContainer) {
        if (field.getType().equals(LocalDateTime.class)) {
            return convertToTimestamp(parseDateTime(exportContainer.getExportValue()));
        } else if (field.getType().equals(LocalDate.class)) {
            return convertToTimestamp(parseDate(exportContainer.getExportValue()));
        } else if (field.getType().equals(LocalTime.class)) {
            return convertToTimestamp(parseTime(exportContainer.getExportValue()));
        } else if (field.getType().equals(Date.class)) {
            return convertToTimestamp(parseSimpleDateLong(exportContainer.getExportValue()));
        } else if (field.getType().equals(Timestamp.class)) {
            return Timestamp.valueOf(exportContainer.getExportValue());
        }
        return null;
    }
1199861
def utcfromtimestamp(cls, timestamp):
    """"""
    obj = datetime.datetime.utcfromtimestamp(timestamp)
    obj = pytz.utc.localize(obj)
    return cls(obj)
216499
@Override
    public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_TIMESTAMP : x;
    }
516976
function timestamp(scheduler) {
    if (scheduler === void 0) {
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
    }
    return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
}
593628
def timestamp_insert(sender, frames):
        
        for frame in frames:
            timestamp = datetime.now(timezone.utc)
            frame.created = timestamp
            frame.modified = timestamp
1332186
public LambdaDslObject timestamp(String name, String format) {
        object.timestamp(name, format);
        return this;
    }
1156717
def polymorphic_update_timestamp(session, flush_context, instances):
    
    for obj in session.dirty:
        if not isinstance(obj, Entity):
            continue
        state = sa.inspect(obj)
        history = state.attrs["updated_at"].history
        if not any((history.added, history.deleted)):
            obj.updated_at = datetime.utcnow()