public final class TimeProviders extends Object
TimeProviders.| Modifier and Type | Method and Description |
|---|---|
static ManualTimeProvider |
manual()
Returns a new instance of
ManualTimeProvider,
that is initialized to the current system time. |
static ManualTimeProvider |
manual(Date startTime)
Returns a new instance of
ManualTimeProvider,
that is initialized to the provided date/time. |
static TimeProvider |
systemClock()
Obtains a
TimeProvider that is based
on system clock. |
public static TimeProvider systemClock()
TimeProvider that is based
on system clock.System.nanoTime()public static ManualTimeProvider manual()
ManualTimeProvider,
that is initialized to the current system time.public static ManualTimeProvider manual(Date startTime)
ManualTimeProvider,
that is initialized to the provided date/time.startTime - initial value for the time providerNullPointerException - if startTime is nullCopyright © 2014 Boleslav Bobcik - Auderis. All rights reserved.