Class TimeProvider
java.lang.Object
org.frankframework.util.TimeProvider
This class provides a way to get current time, but also control time in unit tests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTimeTraveller instances provide scoped access to modifying the "current time" in code. -
Method Summary
Modifier and TypeMethodDescriptionstatic Instantnow()Get the current system time asInstant.static DateGet the current system time as a legacyDate.static LocalDateTimeGet the current system time asLocalDateTimestatic longGet the current system time as clock millis (equivalent toSystem.currentTimeMillis()).static ZonedDateTimeGet the current system time asZonedDateTimestatic TimeProvider.TimeTraveller
-
Method Details
-
now
-
nowAsMillis
public static long nowAsMillis()Get the current system time as clock millis (equivalent toSystem.currentTimeMillis()). -
nowAsZonedDateTime
Get the current system time asZonedDateTime -
nowAsLocalDateTime
Get the current system time asLocalDateTime -
nowAsDate
-
timeTraveller
-