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()
TimingSource
System.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 TimingSource
public void ensureInitialized()
TimingSource
TimingSource.getMonotonicTimeEstimate()
can be used.
Safe to be invoked multiple times.ensureInitialized
in interface TimingSource
public void stop()
TimingSource
stop
in interface TimingSource
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved