jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Static Public Member Functions | List of all members
org.jau.sys.Clock Class Reference
Inheritance diagram for org.jau.sys.Clock:
Collaboration diagram for org.jau.sys.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 native long currentTimeMillis ()
 Returns 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...
 
static long startupTimeMillis ()
 Returns the startup time in monotonic time in milliseconds of the native module. More...
 
static long elapsedTimeMillis ()
 Returns current elapsed monotonic time in milliseconds since module startup, see startupTimeMillis(). More...
 
static long elapsedTimeMillis (final long current_ts)
 Returns elapsed monotonic time in milliseconds since module startup comparing against the given timestamp, see startupTimeMillis(). More...
 

Detailed Description

Definition at line 28 of file Clock.java.

Member Function Documentation

◆ currentTimeMillis()

static native long org.jau.sys.Clock.currentTimeMillis ( )
static

Returns current monotonic time in milliseconds.

Here is the caller graph for this function:

◆ elapsedTimeMillis() [1/2]

static long org.jau.sys.Clock.elapsedTimeMillis ( )
static

Returns current elapsed monotonic time in milliseconds since module startup, see startupTimeMillis().

Definition at line 88 of file Clock.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ elapsedTimeMillis() [2/2]

static long org.jau.sys.Clock.elapsedTimeMillis ( final long  current_ts)
static

Returns elapsed monotonic time in milliseconds since module startup comparing against the given timestamp, see startupTimeMillis().

Definition at line 93 of file Clock.java.

◆ getMonotonicTime()

static Instant org.jau.sys.Clock.getMonotonicTime ( )
static

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

Returned fraction_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.

See also
getWallClockTime()

Definition at line 45 of file Clock.java.

Here is the caller graph for this function:

◆ getWallClockTime()

static Instant org.jau.sys.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
getMonotonicTime()

Definition at line 62 of file Clock.java.

Here is the caller graph for this function:

◆ startupTimeMillis()

static long org.jau.sys.Clock.startupTimeMillis ( )
static

Returns the startup time in monotonic time in milliseconds of the native module.

Definition at line 83 of file Clock.java.

◆ wallClockSeconds()

static native long org.jau.sys.Clock.wallClockSeconds ( )
static

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

Here is the caller graph for this function:

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