MCPcopy Create free account
hub / github.com/apache/solr / NanoTimeTimerImpl

Class NanoTimeTimerImpl

solr/core/src/java/org/apache/solr/util/RTimer.java:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 private static class NanoTimeTimerImpl implements TimerImpl {
47 private final TimeUnit timeUnit;
48 private long start;
49
50 public NanoTimeTimerImpl(TimeUnit timeUnit) {
51 this.timeUnit = timeUnit;
52 }
53
54 @Override
55 public void start() {
56 start = System.nanoTime();
57 }
58
59 @Override
60 public double elapsed() {
61 return timeUnit.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS);
62 }
63 }
64
65 protected TimerImpl newTimerImpl() {
66 return new NanoTimeTimerImpl(timeUnit);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…