Class Timeout

java.lang.Object
org.fest.swing.timing.Timeout

public final class Timeout extends Object
Understands a timeout.
  • Field Details

    • duration

      private final long duration
  • Constructor Details

    • Timeout

      private Timeout(long duration)
  • Method Details

    • timeout

      public static Timeout timeout(long duration)
      Creates a new Timeout.
      Parameters:
      duration - the duration of the timeout in milliseconds.
      Returns:
      the created Timeout.
    • timeout

      public static Timeout timeout(long duration, TimeUnit timeUnit)
      Creates a new Timeout.
      Parameters:
      duration - the duration of the timeout.
      timeUnit - the unit of time of the timeout.
      Returns:
      the created Timeout.
      Throws:
      NullPointerException - if the given time unit is null.
    • duration

      public long duration()
      Returns the duration of the timeout in milliseconds.
      Returns:
      the duration of the timeout in milliseconds.