Class Time

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

public final class Time extends Object
This class contains the static time-sources used within the framework.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static Time.TimeSource
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    Returns a timestamp in milliseconds whose origin is at the Unix Epoch.
    static long
    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
  • Field Details

  • 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