public class Clock
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
SYSTEM_TIME_DISABLED_TIME
The value returned by all static methods in this class, viz.,
newStartTime(TimeUnit)
newStartTimeNanos()
onEndNanos(long)
onEnd(long, TimeUnit)
after calling RxNetty.disableEventPublishing() |
| Constructor and Description |
|---|
Clock() |
| Modifier and Type | Method and Description |
|---|---|
long |
getDuration(java.util.concurrent.TimeUnit targetUnit)
Returns the duration for which this clock was running in the given timeunit.
|
long |
getDurationInNanos()
Returns the duration for which this clock was running in nanoseconds.
|
long |
getStartTime(java.util.concurrent.TimeUnit targetUnit) |
long |
getStartTimeNanos() |
boolean |
isRunning() |
static long |
newStartTime(java.util.concurrent.TimeUnit timeUnit) |
static long |
newStartTimeNanos() |
static long |
onEnd(long startTime,
java.util.concurrent.TimeUnit timeUnit) |
static long |
onEndNanos(long startTimeNanos) |
long |
stop()
Stops this clock.
|
public static final long SYSTEM_TIME_DISABLED_TIME
RxNetty.disableEventPublishing()public long stop()
public long getStartTimeNanos()
public long getStartTime(java.util.concurrent.TimeUnit targetUnit)
public long getDurationInNanos()
java.lang.IllegalStateException - If the clock is not yet stopped.public long getDuration(java.util.concurrent.TimeUnit targetUnit)
java.lang.IllegalStateException - If the clock is not yet stopped.public boolean isRunning()
public static long newStartTimeNanos()
public static long newStartTime(java.util.concurrent.TimeUnit timeUnit)
public static long onEnd(long startTime,
java.util.concurrent.TimeUnit timeUnit)
public static long onEndNanos(long startTimeNanos)