public static final class Util.Timer
extends java.lang.Object
TimeUnit.MILLISECONDS.| Modifier and Type | Field and Description |
|---|---|
private long |
delta |
private long |
markTime |
(package private) long |
startTime |
static java.util.concurrent.TimeUnit |
UNIT |
| Modifier | Constructor and Description |
|---|---|
private |
Timer() |
| Modifier and Type | Method and Description |
|---|---|
long |
deltaAtMark() |
long |
deltaAtMark(java.util.concurrent.TimeUnit unit) |
long |
mark() |
static long |
now() |
float |
opsPerSecAtDelta(long opCount,
long delta) |
float |
opsPerSecAtMark(long opCount) |
static Util.Timer |
startNewTimer() |
public static final java.util.concurrent.TimeUnit UNIT
final long startTime
private long markTime
private long delta
public static final Util.Timer startNewTimer()
public long mark()
public static final long now()
public float opsPerSecAtDelta(long opCount,
long delta)
keyCount - public float opsPerSecAtMark(long opCount)
public long deltaAtMark()
mark() in the timer's TimeUnitpublic long deltaAtMark(java.util.concurrent.TimeUnit unit)
unit - mark() in the specified unit.
If the unit provided is finer than the timer's internal time unit, finer precision will
naturally be irrelevant.