Class NanosecondConverter
java.lang.Object
com.influxdb.client.write.internal.NanosecondConverter
Nanosecond converter.
Utility class converting epoch nanoseconds to epoch with a given precision.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigInteger
convert
(long millis, WritePrecision precision) Convert epoch timestamp (in millis) to a given precision.static BigInteger
convert
(Instant instant, WritePrecision precision) ConvertInstant
timestamp to a given precision.static BigInteger
currentTimestamp
(WritePrecision precision) Get current timestamp in a given precision.
-
Method Details
-
convert
Convert epoch timestamp (in millis) to a given precision.- Parameters:
millis
- epoch timestamp in millisprecision
- precision- Returns:
- epoch timestamp in precision
-
convert
ConvertInstant
timestamp to a given precision.- Parameters:
instant
- Instant timestampprecision
- precision- Returns:
- epoch timestamp in precision
-
currentTimestamp
Get current timestamp in a given precision.- Parameters:
precision
- precision- Returns:
- epoch timestamp in precision
-