Package net.serenitybdd.core.time
Class InternalSystemClock
java.lang.Object
net.serenitybdd.core.time.InternalSystemClock
- All Implemented Interfaces:
SystemClock
public class InternalSystemClock extends java.lang.Object implements SystemClock
Object that encapsulates system clock operations.
-
Constructor Summary
Constructors Constructor Description InternalSystemClock() -
Method Summary
Modifier and Type Method Description java.time.ZonedDateTimegetCurrentTime()Find the current system time.voidpauseFor(long timeInMilliseconds)Pause execution for the requested delay.protected voidsleepFor(long timeInMilliseconds)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
InternalSystemClock
public InternalSystemClock()
-
-
Method Details
-
pauseFor
public void pauseFor(long timeInMilliseconds)Pause execution for the requested delay. Throws a runtime exception if something goes wrong.- Specified by:
pauseForin interfaceSystemClock
-
sleepFor
protected void sleepFor(long timeInMilliseconds) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
getCurrentTime
public java.time.ZonedDateTime getCurrentTime()Find the current system time.- Specified by:
getCurrentTimein interfaceSystemClock
-