edu.wpi.first.wpilibj

## Class Threads

- java.lang.Object
- - edu.wpi.first.wpilibj.Threads

-     public class Threads
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Threads()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Threads

          public Threads()

  - ### 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 priority
        `priority` - 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