Class HighResolutionTimer


  • public class HighResolutionTimer
    extends java.lang.Object
    Control the use of high-resolution timers on Windows by a bit of hackery.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.concurrent.atomic.AtomicReference<java.lang.Thread> THREAD  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void disable()
      Attempt to disable the high resolution timers.
      static void enable()
      Attempt to enable high resolution timers.
      static boolean isEnabled()
      Has the high resolution timer been enabled?
      private static void run()  
      • Methods inherited from class java.lang.Object

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

      • THREAD

        private static final java.util.concurrent.atomic.AtomicReference<java.lang.Thread> THREAD
    • Constructor Detail

      • HighResolutionTimer

        public HighResolutionTimer()
    • Method Detail

      • isEnabled

        public static boolean isEnabled()
        Has the high resolution timer been enabled?
        Returns:
        true if we believe it is enabled otherwise false.
      • enable

        public static void enable()
        Attempt to enable high resolution timers.
      • disable

        public static void disable()
        Attempt to disable the high resolution timers.
      • run

        private static void run()