Creates a TimestampedValue from given {@link StreamRecord}.

@param streamRecord The StreamRecord object from which TimestampedValue is to be created.
8564
public static <T> TimestampedValue<T> from(StreamRecord<T> streamRecord) {
		if (streamRecord.hasTimestamp()) {
			return new TimestampedValue<>(streamRecord.getValue(), streamRecord.getTimestamp());
		} else {
			return new TimestampedValue<>(streamRecord.getValue());
		}
	}
682134
function streamRecorder () {
  let lastKey, lastStream
  return (key, createStream) => {
    if (isFunction(key)) key = key.call()

    debug(`Recorder get key: ${key}`)

    if (key !== lastKey) {
      debug(`Recorder will return a new stream`)

      lastKey = key
      lastStream = createStream.call(null, key)
    }

    return lastStream
  }
}
1270902
@VisibleForTesting
  static Timestamp convertTimestamp(io.opencensus.common.Timestamp censusTimestamp) {
    if (censusTimestamp.getSeconds() < 0) {
      // StackDriver doesn't handle negative timestamps.
      return Timestamp.newBuilder().build();
    }
    return Timestamp.newBuilder()
        .setSeconds(censusTimestamp.getSeconds())
        .setNanos(censusTimestamp.getNanos())
        .build();
  }
216499
@Override
    public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_TIMESTAMP : x;
    }
505362
public void copyTo(ColumnBuffer dest, LongPredicate timestampTest) {
    dest.clear();

    if (key != null) {
      dest.key = new Key(key);
    }

    for (int i = 0; i < timeStamps.size(); i++) {
      long time = timeStamps.get(i);
      if (timestampTest.test(time)) {
        dest.add(time, values.get(i));
      }
    }
  }
1255034
@Override
    public java.util.concurrent.Future<PutRecordResult> putRecordAsync(String streamName, java.nio.ByteBuffer data, String partitionKey,
            String sequenceNumberForOrdering, com.amazonaws.handlers.AsyncHandler<PutRecordRequest, PutRecordResult> asyncHandler) {

        return putRecordAsync(
                new PutRecordRequest().withStreamName(streamName).withData(data).withPartitionKey(partitionKey)
                        .withSequenceNumberForOrdering(sequenceNumberForOrdering), asyncHandler);
    }
1128514
Stream<String> writeTimeGauge(TimeGauge gauge) {
        Double value = gauge.value(getBaseTimeUnit());
        if (Double.isFinite(value)) {
            return Stream.of(event(gauge.getId(), new Attribute("value", value)));
        }
        return Stream.empty();
    }
117545
public static Timestamp toTimestamp(DateTime dt) {
        if (dt == null) {
            return null;
        } else {
            return new Timestamp(dt.getMillis());
        }
    }
640632
function(options) {
  // Ensure an instance is created
  if (!(this instanceof TimeChunkedStream)) {
    return new TimeChunkedStream(options);
  }

  // Always decode strings
  options.decodeStrings = true;

  // Initialize base class
  Transform.call(this, options);

  // Create internal buffer
  this._buffer  = new BufferBuilder();
  this._timeout = options.timeout;
  this._timer   = null;
}
460181
public static V1Annotation create(long timestamp, String value, @Nullable Endpoint endpoint) {
    return new V1Annotation(timestamp, value, endpoint);
  }
366732
protected WARCRecord createArchiveRecord(InputStream is, long offset)
    throws IOException {
        return (WARCRecord)currentRecord(new WARCRecord(is,
        	getReaderIdentifier(), offset, isDigest(), isStrict()));
    }
143032
public void setTimestamp(String fieldName, Timestamp value) {
		if (value == null) {
			throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
		}
		fieldList.add(fieldName);
		statementParameter.setTimestamp(value);
	}
1061510
@Override
    public java.util.concurrent.Future<PutRecordResult> putRecordAsync(String streamName, java.nio.ByteBuffer data, String partitionKey,
            String sequenceNumberForOrdering) {

        return putRecordAsync(new PutRecordRequest().withStreamName(streamName).withData(data).withPartitionKey(partitionKey)
                .withSequenceNumberForOrdering(sequenceNumberForOrdering));
    }
883857
public void setTimeStamp(final String timeStamp)
	{

		String time = timeStamp.replace('T', ' ');
		time = time.replace('Z', ' ');

		this.timeStamp = Timestamp.valueOf(time);
	}
384222
public static java.sql.Timestamp toTimestamp(String date, String time) {
		java.util.Date newDate = toDate(date, time);

		if (newDate != null)
			return new java.sql.Timestamp(newDate.getTime());
		else
			return null;
	}
287893
public void copyTo(T valueCopy, StreamRecord<T> target) {
		target.value = valueCopy;
		target.timestamp = this.timestamp;
		target.hasTimestamp = this.hasTimestamp;
	}
62409
public static Value.Builder makeValue(Date date) {
    return Value.newBuilder().setTimestampValue(toTimestamp(date.getTime() * 1000L));
  }