Package org.terracotta.statistics
Class Time
java.lang.Object
org.terracotta.statistics.Time
This class contains the static time-sources used within the framework.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longReturns a timestamp in milliseconds whose origin is at the Unix Epoch.static longtime()Returns a timestamp in nanoseconds with an arbitrary origin suitable for timing purposes.
-
Field Details
-
TIME_SOURCE
-
-
Constructor Details
-
Time
private Time()
-
-
Method Details
-
time
public static long time()Returns a timestamp in nanoseconds with an arbitrary origin suitable for timing purposes.This contract is non-coincidentally reminiscent of
System.nanoTime().- Returns:
- a time in nanoseconds
-
absoluteTime
public static long absoluteTime()Returns a timestamp in milliseconds whose origin is at the Unix Epoch.This contract is non-coincidentally reminiscent of
System.currentTimeMillis().- Returns:
- a Unix timestamp
-