26import java.time.Instant;
29 private static long t0;
31 t0 = startupTimeMillisImpl();
33 private static native
long startupTimeMillisImpl();
46 final long[] val = { 0, 0 };
47 getMonotonicTimeImpl(val);
48 return Instant.ofEpochSecond(val[0], val[1]);
50 private static native
void getMonotonicTimeImpl(
final long[] val);
63 final long[] val = { 0, 0 };
64 getWallClockTimeImpl(val);
65 return Instant.ofEpochSecond(val[0], val[1]);
67 private static native
void getWallClockTimeImpl(
final long[] val);
static Instant getWallClockTime()
Returns current wall-clock real-time since Unix Epoch 00:00:00 UTC on 1970-01-01.
static long elapsedTimeMillis()
Returns current elapsed monotonic time in milliseconds since module startup, see startupTimeMillis().
static native long currentTimeMillis()
Returns current monotonic time in milliseconds.
static long startupTimeMillis()
Returns the startup time in monotonic time in milliseconds of the native module.
static Instant getMonotonicTime()
Returns current monotonic time since Unix Epoch 00:00:00 UTC on 1970-01-01.
static native long wallClockSeconds()
Returns current wall-clock system time of day in seconds since Unix Epoch 00:00:00 UTC on 1 January 1...
static long elapsedTimeMillis(final long current_ts)
Returns elapsed monotonic time in milliseconds since module startup comparing against the given times...