public final class Timer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static long |
msDiff(long compareTime)
Calculates the difference in time between a given time and now..
|
static long |
now()
Calculates the current time based on either the number of milliseconds since the UNIX epoch or a fixed time when
using a simulated time.
|
static void |
setTime(java.lang.String dateString)
Sets the simulated time and forces the Toolkit to use a simulated fixed time.
|
static void |
useRealTime()
Resets the Toolkit to use the current milliseconds rather than a simulated time.
|
public static void useRealTime()
public static long now()
public static long msDiff(long compareTime)
compareTime
- the compare timepublic static void setTime(java.lang.String dateString)
dateString
- a date represented in the format "yyyyMMdd.HHmmss".