Class Timer

  • All Implemented Interfaces:
    Recyclable

    public class Timer
    extends java.lang.Object
    implements Recyclable
    This timer track the total time and the count of invocations so that it allows for calculating weighted averages.
    • Constructor Summary

      Constructors 
      Constructor Description
      Timer()  
    • Constructor Detail

      • Timer

        public Timer()
    • Method Detail

      • update

        public void update​(long durationUs)
      • update

        public void update​(long durationUs,
                           long count)
      • getTotalTimeUs

        public long getTotalTimeUs()
      • getTotalTimeMs

        public double getTotalTimeMs()
      • getCount

        public long getCount()
      • hasContent

        public boolean hasContent()
      • resetState

        public void resetState()
        Description copied from interface: Recyclable
        resets pooled object state so it can be reused
        Specified by:
        resetState in interface Recyclable