25package com.jogamp.common.os;
27import java.time.Instant;
30 private static final Instant t0;
34 final long[] val = { 0, 0 };
35 if( getMonotonicStartupTimeImpl(val) ) {
36 t0 = Instant.ofEpochSecond(val[0], val[1]);
64 final long[] val = { 0, 0 };
65 if( getMonotonicTimeImpl(val) ) {
66 return Instant.ofEpochSecond(val[0], val[1]);
71 private static native
boolean getMonotonicTimeImpl(
final long[] val);
88 final long[] val = { 0, 0 };
89 if( getWallClockTimeImpl(val) ) {
90 return Instant.ofEpochSecond(val[0], val[1]);
95 private static native
boolean getWallClockTimeImpl(
final long[] val);
103 private static native
boolean getMonotonicStartupTimeImpl(
final long[] val);
143 return Instant.ofEpochSecond(nanos/1000000000L, nanos%1000000000L);
static native long currentNanos()
Returns current monotonic nanoseconds since start of this application.
static Instant getMonotonicStartupTime()
Returns the monotonic startup time since module startup as used in currentNanos() and getMonotonicNan...
static Instant getMonotonicTime()
Returns current monotonic time since Unix Epoch 00:00:00 UTC on 1970-01-01.
static Instant getMonotonicNanos()
Returns the Instant presentation of monotonic currentNanos().
static Instant getWallClockTime()
Returns current wall-clock real-time since Unix Epoch 00:00:00 UTC on 1970-01-01.
static native long currentTimeMillis()
Returns the unix based current monotonic time in milliseconds.
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 native long currentMillis()
Returns current monotonic milliseconds since start of this application.