Top Description Inners Fields Constructors Methods
org.terracotta.statistics

public final Class Time

extends Object
Class Inheritance

This class contains the static time-sources used within the framework.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private static volatile Time.TimeSource

Constructor Summary

AccessConstructor and Description
private
Time()

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

a Unix timestamp
absoluteTime
()

Returns a timestamp in milliseconds whose origin is at the Unix Epoch.

public static long

Returns:

a time in nanoseconds
time
()

Returns a timestamp in nanoseconds with an arbitrary origin suitable for timing purposes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TIME_SOURCEback to summary
private static volatile Time.TimeSource TIME_SOURCE

Constructor Detail

Timeback to summary
private Time()

Method Detail

absoluteTimeback to summary
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:long

a Unix timestamp

timeback to summary
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:long

a time in nanoseconds

org.terracotta.statistics back to summary

public Interface Time.TimeSource


Method Summary

Modifier and TypeMethod and Description
public long
public long
time()

Method Detail

absoluteTimeback to summary
public long absoluteTime()
timeback to summary
public long time()