Package org.camunda.bpm.engine.impl.util
Class ClockUtil
java.lang.Object
org.camunda.bpm.engine.impl.util.ClockUtil
- Author:
- Joram Barrez
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Date
static Date
now()
static Date
Moves the clock by the given offset and keeps it running from that point on.static void
reset()
static Date
static void
setCurrentTime
(Date currentTime) Freezes the clock to a specified Date that will be returned bynow()
andgetCurrentTime()
-
Constructor Details
-
ClockUtil
public ClockUtil()
-
-
Method Details
-
setCurrentTime
Freezes the clock to a specified Date that will be returned bynow()
andgetCurrentTime()
- Parameters:
currentTime
- the Date to freeze the clock at
-
reset
public static void reset() -
getCurrentTime
-
now
-
offset
Moves the clock by the given offset and keeps it running from that point on.- Parameters:
offsetInMillis
- the offset to move the clock by- Returns:
- the new 'now'
-
resetClock
-