Package org.agrona.concurrent
Class HighResolutionTimer
- java.lang.Object
-
- org.agrona.concurrent.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
-
Constructor Summary
Constructors Constructor Description HighResolutionTimer()
-
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()
-
-
-
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()
-
-