Class Clock.CpuTimeClock

  • Enclosing class:
    Clock

    public static class Clock.CpuTimeClock
    extends Clock
    A clock implementation which returns the current thread's CPU time.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.management.ThreadMXBean THREAD_MX_BEAN  
    • Constructor Summary

      Constructors 
      Constructor Description
      CpuTimeClock()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getTick()
      Returns the current time tick.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • THREAD_MX_BEAN

        private static final java.lang.management.ThreadMXBean THREAD_MX_BEAN
    • Constructor Detail

      • CpuTimeClock

        public CpuTimeClock()
    • Method Detail

      • getTick

        public long getTick()
        Description copied from class: Clock
        Returns the current time tick.
        Specified by:
        getTick in class Clock
        Returns:
        time tick in nanoseconds