Class StopWatch


  • public final class StopWatch
    extends java.lang.Object
    A time measuring device
    Author:
    Lukas Eder
    • Constructor Summary

      Constructors 
      Constructor Description
      StopWatch()
      Initialise the stop watch
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String format​(long nanoTime)  
      static java.lang.String formatHours​(long seconds)  
      long split()  
      void splitDebug​(java.lang.String message)
      Split the time and debug log a message, if trace logging is enabled
      void splitDebug​(java.lang.String message, long thresholdNano)
      Split the time and debug log a message if the split time exceeds a certain threshold and if trace logging is enabled
      void splitInfo​(java.lang.String message)
      Split the time and info log a message, if trace logging is enabled
      void splitInfo​(java.lang.String message, long thresholdNano)
      Split the time and info log a message if the split time exceeds a certain threshold and if trace logging is enabled
      void splitTrace​(java.lang.String message)
      Split the time and trace log a message, if trace logging is enabled.
      void splitTrace​(java.lang.String message, long thresholdNano)
      Split the time and trace log a message if the split time exceeds a certain threshold and if trace logging is enabled.
      void splitWarn​(java.lang.String message)
      Split the time and warn log a message, if trace logging is enabled
      void splitWarn​(java.lang.String message, long thresholdNano)
      Split the time and warn log a message if the split time exceeds a certain threshold and if trace logging is enabled
      • Methods inherited from class java.lang.Object

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

      • StopWatch

        public StopWatch()
        Initialise the stop watch
    • Method Detail

      • splitTrace

        public void splitTrace​(java.lang.String message)
        Split the time and trace log a message, if trace logging is enabled.
      • splitTrace

        public void splitTrace​(java.lang.String message,
                               long thresholdNano)
        Split the time and trace log a message if the split time exceeds a certain threshold and if trace logging is enabled.
      • splitDebug

        public void splitDebug​(java.lang.String message)
        Split the time and debug log a message, if trace logging is enabled
      • splitDebug

        public void splitDebug​(java.lang.String message,
                               long thresholdNano)
        Split the time and debug log a message if the split time exceeds a certain threshold and if trace logging is enabled
      • splitInfo

        public void splitInfo​(java.lang.String message)
        Split the time and info log a message, if trace logging is enabled
      • splitInfo

        public void splitInfo​(java.lang.String message,
                              long thresholdNano)
        Split the time and info log a message if the split time exceeds a certain threshold and if trace logging is enabled
      • splitWarn

        public void splitWarn​(java.lang.String message)
        Split the time and warn log a message, if trace logging is enabled
      • splitWarn

        public void splitWarn​(java.lang.String message,
                              long thresholdNano)
        Split the time and warn log a message if the split time exceeds a certain threshold and if trace logging is enabled
      • split

        public long split()
      • format

        public static java.lang.String format​(long nanoTime)
      • formatHours

        public static java.lang.String formatHours​(long seconds)