GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.os.Clock Class Reference
Collaboration diagram for com.jogamp.common.os.Clock:

Static Public Member Functions

static Instant getMonotonicTime ()
 Returns current monotonic time since Unix Epoch 00:00:00 UTC on 1970-01-01. More...
 
static Instant getWallClockTime ()
 Returns current wall-clock real-time since Unix Epoch 00:00:00 UTC on 1970-01-01. More...
 
static Instant getMonotonicStartupTime ()
 Returns the monotonic startup time since module startup as used in currentNanos() and getMonotonicNanos(). More...
 
static native long currentNanos ()
 Returns current monotonic nanoseconds since start of this application. More...
 
static Instant getMonotonicNanos ()
 Returns the Instant presentation of monotonic currentNanos(). More...
 
static native long currentMillis ()
 Returns current monotonic milliseconds since start of this application. More...
 
static native long currentTimeMillis ()
 Returns the unix based current monotonic time in milliseconds. More...
 
static native long wallClockSeconds ()
 Returns current wall-clock system time of day in seconds since Unix Epoch 00:00:00 UTC on 1 January 1970. More...
 

Detailed Description

Definition at line 29 of file Clock.java.

Member Function Documentation

◆ currentMillis()

static native long com.jogamp.common.os.Clock.currentMillis ( )
static

Returns current monotonic milliseconds since start of this application.

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

See also
getMonotonicStartupTime()
currentNanos()
getMonotonicNanos()
Here is the caller graph for this function:

◆ currentNanos()

static native long com.jogamp.common.os.Clock.currentNanos ( )
static

Returns current monotonic nanoseconds since start of this application.

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

The returned nanoseconds are counted not from Unix Epoch but start of this module, hence it lasts for 9'223'372'036 seconds or 292 years using the 64-bit type long.

Method name doesn't include the term Time intentionally, since the returned value represent the nanoseconds duration since module start.

See also
getMonotonicStartupTime()
getMonotonicNanos()
Here is the caller graph for this function:

◆ currentTimeMillis()

static native long com.jogamp.common.os.Clock.currentTimeMillis ( )
static

Returns the unix based current monotonic time in milliseconds.

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

See also
getMonotonicStartupTime()
currentNanos()
getMonotonicNanos()
Here is the caller graph for this function:

◆ getMonotonicNanos()

static Instant com.jogamp.common.os.Clock.getMonotonicNanos ( )
static

Returns the Instant presentation of monotonic currentNanos().

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

The returned nanoseconds are counted not from Unix Epoch but start of this module, hence it lasts for 9'223'372'036 seconds or 292 years using the 64-bit type long.

Method name doesn't include the term Time intentionally, since the returned value represent the nanoseconds duration since module start.

See also
getMonotonicStartupTime()
currentNanos()

Definition at line 141 of file Clock.java.

Here is the call graph for this function:

◆ getMonotonicStartupTime()

static Instant com.jogamp.common.os.Clock.getMonotonicStartupTime ( )
static

Returns the monotonic startup time since module startup as used in currentNanos() and getMonotonicNanos().

See also
currentNanos()
getMonotonicNanos()

Definition at line 102 of file Clock.java.

◆ getMonotonicTime()

static Instant com.jogamp.common.os.Clock.getMonotonicTime ( )
static

Returns current monotonic time since Unix Epoch 00:00:00 UTC on 1970-01-01.

Returned timespec is passing machine precision and range of the underlying native API.

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

Note that currentNanos() and getMonotonicNanos() perform much better than this method, since they only return one long nanosecond value since module startup.
The implementation of this method needs to write two long values into an array.

See also
getMonotonicStartupTime()
currentNanos()
getMonotonicNanos()
getWallClockTime()

Definition at line 63 of file Clock.java.

Here is the caller graph for this function:

◆ getWallClockTime()

static Instant com.jogamp.common.os.Clock.getWallClockTime ( )
static

Returns current wall-clock real-time since Unix Epoch 00:00:00 UTC on 1970-01-01.

Returned Instant is passing machine precision and range of the underlying native API.

Wall-Clock time shall be used for accurate measurements of the actual time only, since the underlying OS unlikely supports fast calls.

See also
getMonotonicStartupTime()
currentNanos()
getMonotonicNanos()
getMonotonicTime()

Definition at line 87 of file Clock.java.

Here is the caller graph for this function:

◆ wallClockSeconds()

static native long com.jogamp.common.os.Clock.wallClockSeconds ( )
static

Returns current wall-clock system time of day in seconds since Unix Epoch 00:00:00 UTC on 1 January 1970.

See also
getWallClockTime()
getMonotonicTime()
currentNanos()
getMonotonicNanos()
Here is the caller graph for this function:

The documentation for this class was generated from the following file: