Class MonotonicClock

java.lang.Object
org.apache.camel.support.MonotonicClock
All Implemented Interfaces:
org.apache.camel.clock.Clock

public final class MonotonicClock extends Object implements org.apache.camel.clock.Clock
A clock that increases monotonically (i.e.: does not go back in time) for precise elapsed calculations.
  • Constructor Details

    • MonotonicClock

      public MonotonicClock()
  • Method Details

    • elapsed

      public long elapsed()
      Specified by:
      elapsed in interface org.apache.camel.clock.Clock
    • getCreated

      public long getCreated()
      Specified by:
      getCreated in interface org.apache.camel.clock.Clock