public final class RelativeTime extends Object implements ITimeProvider
Returns the current value of the running Java Virtual Machine's high-resolution time source, converted from
nanoseconds to milliseconds. This method timeMillis()
can only be used to measure elapsed time and is not
related to any other notion of system or wall-clock time. The value returned represents milliseconds since some fixed
but arbitrary origin time (perhaps in the future, so values may be negative). The same origin is used by all
invocations of this method in an instance of a Java virtual machine; other virtual machine instances are likely to
use a different origin.
Constructor and Description |
---|
RelativeTime()
Returns a RelativeTime instance based on nanosecond precision.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRelative() |
long |
timeMillis()
Returns the current value of the most precise available system timer, in milliseconds.
|
public RelativeTime()
public long timeMillis()
timeMillis
in interface ITimeProvider
public boolean isRelative()
isRelative
in interface ITimeProvider
Copyright © GigaSpaces.