Package edu.wpi.first.wpilibj
Class Threads
- java.lang.Object
-
- edu.wpi.first.wpilibj.Threads
-
public final class Threads extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
getCurrentThreadIsRealTime()
Get if the current thread is realtime.static int
getCurrentThreadPriority()
Get the thread priority for the current thread.static boolean
setCurrentThreadPriority(boolean realTime, int priority)
Sets the thread priority for the current thread.
-
-
-
Method Detail
-
getCurrentThreadPriority
public static int getCurrentThreadPriority()
Get the thread priority for the current thread.- Returns:
- The current thread priority. Scaled 1-99.
-
getCurrentThreadIsRealTime
public static boolean getCurrentThreadIsRealTime()
Get if the current thread is realtime.- Returns:
- If the current thread is realtime
-
setCurrentThreadPriority
public static boolean setCurrentThreadPriority(boolean realTime, int priority)
Sets the thread priority for the current thread.- Parameters:
realTime
- Set to true to set a realtime priority, false for standard prioritypriority
- Priority to set the thread to. Scaled 1-99, with 1 being highest. On RoboRIO, priority is ignored for non realtime setting- Returns:
- The success state of setting the priority
-
-