public class PlatformUtilsBase
extends java.lang.Object
By using the above scheme, calls are static & most efficient, there's no need for extra infrastructure around a factory class, and perhaps most importantly if the platform doesn't implement a method which is actually needed by some code it uses, that problem is caught at compile time not run time.
| Modifier and Type | Field and Description |
|---|---|
static long |
currentTimeOverride |
| Constructor and Description |
|---|
PlatformUtilsBase() |
| Modifier and Type | Method and Description |
|---|---|
static long |
getCurrentTimeMillis()
Get the number of milliseconds since Jan 1, 1970, UTC time.
|
static void |
setCurrentTimeOverride(long currentTimeOverrideInMillis)
Set an override for the current time, that will then be returned from getCurrentTimeMillis instead of the actual
time being returned.
|
public static long getCurrentTimeMillis()
public static void setCurrentTimeOverride(long currentTimeOverrideInMillis)
currentTimeOverrideInMillis - override for current time, in millis, or DateTime.NULL_DATE to clear override