Interface TimingSource


public interface TimingSource
Since:
4.1
Author:
Sanne Grinovero (C) 2012 Red Hat Inc.
  • Method Details

    • monotonicTimeEstimate

      long monotonicTimeEstimate()
      Returns an approximation of System.nanoTime(). Performance should be preferred over accuracy by the implementation, but the value is monotonic and expresses time in milliseconds, however, subsequent invocations could return the same value.
      Returns:
      an increasing value related to time in milliseconds. Only meaningful to compare time intervals, with no guarantees of high precision.
    • stop

      void stop()
      Invoked on engine integration shutdown. There is no start method as it's expected to be lazily initialized
    • ensureTimeEstimateIsInitialized

      void ensureTimeEstimateIsInitialized()
      Needs to be invoked at least once before monotonicTimeEstimate() can be used. Safe to be invoked multiple times.
    • nanoTime

      long nanoTime()
      Returns current system time in nanoseconds. Accuracy is preferred over performance by the implementation.
      Returns:
      high precision current time in nanoseconds.