Deprecated
Use Durations and Timestamps instead.
| Modifier and Type | Field and Description |
|---|---|
| public static final long | |
| public static final long | |
| private static final long | |
| private static final BigInteger | |
| public static final long | |
| public static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Timestamp | add(Timestamp start, Duration length)
Deprecated
Use
Add a duration to a timestamp.
Timestamps#add instead.
|
| public static Duration | |
| private static Duration | |
| public static Duration | createDurationFromMicros(long microseconds)
Deprecated
Use
Create a Duration from the number of microseconds.
Durations#fromMicros instead.
|
| public static Duration | createDurationFromMillis(long milliseconds)
Deprecated
Use
Create a Duration from the number of milliseconds.
Durations#fromMillis instead.
|
| public static Duration | createDurationFromNanos(long nanoseconds)
Deprecated
Use
Create a Duration from the number of nanoseconds.
Durations#fromNanos instead.
|
| public static Timestamp | createTimestampFromMicros(long microseconds)
Deprecated
Use
Create a Timestamp from the number of microseconds elapsed from the epoch.
Timestamps#fromMicros instead.
|
| public static Timestamp | createTimestampFromMillis(long milliseconds)
Deprecated
Use
Create a Timestamp from the number of milliseconds elapsed from the epoch.
Timestamps#fromMillis instead.
|
| public static Timestamp | createTimestampFromNanos(long nanoseconds)
Deprecated
Use
Create a Timestamp from the number of nanoseconds elapsed from the epoch.
Timestamps#fromNanos instead.
|
| public static Duration | distance(Timestamp from, Timestamp to)
Deprecated
Use
Calculate the difference between two timestamps.
Timestamps#between instead.
|
| public static Duration | |
| public static Duration | |
| public static long | |
| public static Timestamp | getCurrentTime()
Deprecated
Use
Get the current time.
Timestamps.fromMillis(System.currentTimeMillis()) instead.
|
| public static Timestamp | |
| public static Duration | |
| public static Duration | |
| private static Duration | |
| public static Duration | Returns: A Duration parsed from the string.
Deprecated
Use
Parse from a string to produce a duration.
Durations#parse instead.
|
| public static Timestamp | Returns: A Timestamp parsed from the string.
Deprecated
Use
Parse from RFC 3339 date string to Timestamp.
Timestamps#parse instead.
|
| public static Duration | |
| public static Timestamp | subtract(Timestamp start, Duration length)
Deprecated
Use
Subtract a duration from a timestamp.
Timestamps#subtract instead.
|
| public static Duration | subtract(Duration d1, Duration d2)
Deprecated
Use
Subtract a duration from another.
Durations#subtract instead.
|
| private static BigInteger | |
| private static BigInteger | |
| public static long | toMicros(Timestamp timestamp)
Deprecated
Use
Convert a Timestamp to the number of microseconds elapsed from the epoch.
Timestamps#toMicros instead.
|
| public static long | toMicros(Duration duration)
Deprecated
Use
Convert a Duration to the number of microseconds.The result will be
rounded towards 0 to the nearest microseconds.
Durations#toMicros instead.
|
| public static long | toMillis(Timestamp timestamp)
Deprecated
Use
Convert a Timestamp to the number of milliseconds elapsed from the epoch.
Timestamps#toMillis instead.
|
| public static long | toMillis(Duration duration)
Deprecated
Use
Convert a Duration to the number of milliseconds.The result will be
rounded towards 0 to the nearest millisecond.
Durations#toMillis instead.
|
| public static long | toNanos(Timestamp timestamp)
Deprecated
Use
Convert a Timestamp to the number of nanoseconds elapsed from the epoch.
Timestamps#toNanos instead.
|
| public static long | toNanos(Duration duration)
Deprecated
Use
Convert a Duration to the number of nanoseconds.
Durations#toNanos instead.
|
| public static String | Returns: The string representation of the given timestamp.
Deprecated
Use
Convert Timestamp to RFC 3339 date string format.
Timestamps#toString instead.
|
| public static String | Returns: The string representation of the given duration.
Deprecated
Use
Convert Duration to string format.
Durations#toString instead.
|
| DURATION_SECONDS_MAX | back to summary |
|---|---|
| public static final long DURATION_SECONDS_MAX | |
| DURATION_SECONDS_MIN | back to summary |
|---|---|
| public static final long DURATION_SECONDS_MIN | |
| NANOS_PER_SECOND | back to summary |
|---|---|
| private static final long NANOS_PER_SECOND | |
| NANOS_PER_SECOND_BIG_INTEGER | back to summary |
|---|---|
| private static final BigInteger NANOS_PER_SECOND_BIG_INTEGER | |
| TIMESTAMP_SECONDS_MAX | back to summary |
|---|---|
| public static final long TIMESTAMP_SECONDS_MAX | |
| TIMESTAMP_SECONDS_MIN | back to summary |
|---|---|
| public static final long TIMESTAMP_SECONDS_MIN | |
| TimeUtil | back to summary |
|---|---|
| private TimeUtil() | |
| add | back to summary |
|---|---|
| public static Timestamp add(Timestamp start, Duration length)
Deprecated Use Add a duration to a timestamp.
| |
| add | back to summary |
|---|---|
| public static Duration add(Duration d1, Duration d2)
Deprecated Use Add two durations.
| |
| createDurationFromBigInteger | back to summary |
|---|---|
| private static Duration createDurationFromBigInteger(BigInteger value) | |
| createDurationFromMicros | back to summary |
|---|---|
| public static Duration createDurationFromMicros(long microseconds)
Deprecated Use Create a Duration from the number of microseconds.
| |
| createDurationFromMillis | back to summary |
|---|---|
| public static Duration createDurationFromMillis(long milliseconds)
Deprecated Use Create a Duration from the number of milliseconds.
| |
| createDurationFromNanos | back to summary |
|---|---|
| public static Duration createDurationFromNanos(long nanoseconds)
Deprecated Use Create a Duration from the number of nanoseconds.
| |
| createTimestampFromMicros | back to summary |
|---|---|
| public static Timestamp createTimestampFromMicros(long microseconds)
Deprecated Use Create a Timestamp from the number of microseconds elapsed from the epoch.
| |
| createTimestampFromMillis | back to summary |
|---|---|
| public static Timestamp createTimestampFromMillis(long milliseconds)
Deprecated Use Create a Timestamp from the number of milliseconds elapsed from the epoch.
| |
| createTimestampFromNanos | back to summary |
|---|---|
| public static Timestamp createTimestampFromNanos(long nanoseconds)
Deprecated Use Create a Timestamp from the number of nanoseconds elapsed from the epoch.
| |
| distance | back to summary |
|---|---|
| public static Duration distance(Timestamp from, Timestamp to)
Deprecated Use Calculate the difference between two timestamps.
| |
| divide | back to summary |
|---|---|
| public static Duration divide(Duration duration, double value) | |
| divide | back to summary |
|---|---|
| public static Duration divide(Duration duration, long times) | |
| divide | back to summary |
|---|---|
| public static long divide(Duration d1, Duration d2) | |
| getCurrentTime | back to summary |
|---|---|
| public static Timestamp getCurrentTime()
Deprecated Use Get the current time.
| |
| getEpoch | back to summary |
|---|---|
| public static Timestamp getEpoch()
Deprecated Use Get the epoch.
| |
| multiply | back to summary |
|---|---|
public static Duration multiply(Duration duration, double times)
| |
| multiply | back to summary |
|---|---|
| public static Duration multiply(Duration duration, long times) | |
| normalizedDuration | back to summary |
|---|---|
| private static Duration normalizedDuration(long seconds, int nanos) | |
| parseDuration | back to summary |
|---|---|
| public static Duration parseDuration(String value) throws ParseException
Deprecated Use Parse from a string to produce a duration.
| |
| parseTimestamp | back to summary |
|---|---|
| public static Timestamp parseTimestamp(String value) throws ParseException
Deprecated Use Parse from RFC 3339 date string to Timestamp. This method accepts all
outputs of Example of accepted format: "1972-01-01T10:00:20.021-05:00"
| |
| remainder | back to summary |
|---|---|
| public static Duration remainder(Duration d1, Duration d2) | |
| subtract | back to summary |
|---|---|
| public static Timestamp subtract(Timestamp start, Duration length)
Deprecated Use Subtract a duration from a timestamp.
| |
| subtract | back to summary |
|---|---|
| public static Duration subtract(Duration d1, Duration d2)
Deprecated Use Subtract a duration from another.
| |
| toBigInteger | back to summary |
|---|---|
| private static BigInteger toBigInteger(Duration duration) | |
| toBigInteger | back to summary |
|---|---|
| private static BigInteger toBigInteger(long value) | |
| toMicros | back to summary |
|---|---|
| public static long toMicros(Timestamp timestamp)
Deprecated Use Convert a Timestamp to the number of microseconds elapsed from the epoch. The result will be rounded down to the nearest microsecond. E.g., if the timestamp represents "1969-12-31T23:59:59.999999999Z", it will be rounded to -1 millisecond.
| |
| toMicros | back to summary |
|---|---|
| public static long toMicros(Duration duration)
Deprecated Use Convert a Duration to the number of microseconds.The result will be rounded towards 0 to the nearest microseconds. E.g., if the duration represents -1 nanosecond, it will be rounded to 0.
| |
| toMillis | back to summary |
|---|---|
| public static long toMillis(Timestamp timestamp)
Deprecated Use Convert a Timestamp to the number of milliseconds elapsed from the epoch. The result will be rounded down to the nearest millisecond. E.g., if the timestamp represents "1969-12-31T23:59:59.999999999Z", it will be rounded to -1 millisecond.
| |
| toMillis | back to summary |
|---|---|
| public static long toMillis(Duration duration)
Deprecated Use Convert a Duration to the number of milliseconds.The result will be rounded towards 0 to the nearest millisecond. E.g., if the duration represents -1 nanosecond, it will be rounded to 0.
| |
| toNanos | back to summary |
|---|---|
| public static long toNanos(Timestamp timestamp)
Deprecated Use Convert a Timestamp to the number of nanoseconds elapsed from the epoch.
| |
| toNanos | back to summary |
|---|---|
| public static long toNanos(Duration duration)
Deprecated Use Convert a Duration to the number of nanoseconds.
| |
| toString | back to summary |
|---|---|
| public static String toString(Timestamp timestamp)
Deprecated Use Convert Timestamp to RFC 3339 date string format. The output will always be Z-normalized and uses 3, 6 or 9 fractional digits as required to represent the exact value. Note that Timestamp can only represent time from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. See https://www.ietf.org/rfc/rfc3339.txt Example of generated format: "1972-01-01T10:00:20.021Z"
| |
| toString | back to summary |
|---|---|
| public static String toString(Duration duration)
Deprecated Use Convert Duration to string format. The string format will contains 3, 6, or 9 fractional digits depending on the precision required to represent the exact Duration value. For example: "1s", "1.010s", "1.000000100s", "-3.100s" The range that can be represented by Duration is from -315,576,000,000 to +315,576,000,000 inclusive (in seconds).
| |