public final class DefaultTimingSource extends Object implements TimingSource
TimingSource| Constructor and Description |
|---|
DefaultTimingSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureInitialized()
Needs to be invoked at least once before
TimingSource.getMonotonicTimeEstimate() can be used. |
long |
getMonotonicTimeEstimate()
Returns an approximation of
System.nanoTime(). |
void |
stop()
Invoked on SearchIntegrator shutdown.
|
public long getMonotonicTimeEstimate()
TimingSourceSystem.nanoTime().
Performance should be preferred over accuracy by the implementation, but the value is monotonic
and expresses time in milliseconds, however, subsequent invocations could return the same value.getMonotonicTimeEstimate in interface TimingSourcepublic void ensureInitialized()
TimingSourceTimingSource.getMonotonicTimeEstimate() can be used.
Safe to be invoked multiple times.ensureInitialized in interface TimingSourcepublic void stop()
TimingSourcestop in interface TimingSourceCopyright © 2006-2015 Red Hat, Inc. All Rights Reserved