Class Clock

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Clock.CpuTimeClock
      A clock implementation which returns the current thread's CPU time.
      static class  Clock.UserTimeClock
      A clock implementation which returns the current time in epoch nanoseconds.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Clock DEFAULT  
    • Constructor Summary

      Constructors 
      Constructor Description
      Clock()  
    • Field Detail

      • DEFAULT

        private static final Clock DEFAULT
    • Constructor Detail

      • Clock

        public Clock()
    • Method Detail

      • getTick

        public abstract long getTick()
        Returns the current time tick.
        Returns:
        time tick in nanoseconds
      • getTime

        public long getTime()
        Returns the current time in milliseconds.
        Returns:
        time in milliseconds