Class Stopwatch

java.lang.Object
com.codeborne.selenide.Stopwatch

public class Stopwatch extends Object
  • Constructor Details

    • Stopwatch

      public Stopwatch(Duration timeout)
    • Stopwatch

      public Stopwatch(long timeoutMs)
  • Method Details

    • isTimeoutReached

      public boolean isTimeoutReached()
    • getElapsedTimeMs

      public long getElapsedTimeMs()
    • sleep

      public void sleep(long milliseconds)
    • sleepAtLeast

      public static void sleepAtLeast(long milliseconds)
      Sleep at least given number of milliseconds. Default Thread.sleep(long) doesn't guarantee the sleep duration, it can awake earlier.
      Parameters:
      milliseconds - the number of milliseconds to sleep