org.terracotta.statistics
Class Time

java.lang.Object
  extended by org.terracotta.statistics.Time

public final class Time
extends Object

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


Nested Class Summary
static interface Time.TimeSource
           
 
Method Summary
static long absoluteTime()
          Returns a timestamp in milliseconds whose origin is at the Unix Epoch.
static long time()
          Returns a timestamp in nanoseconds with an arbitrary origin suitable for timing purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2016. All Rights Reserved.