public class ElapsedTimer extends Object implements AutoCloseable
System.nanoTime(). Timing is started when the
instance is created, and stopped when close() is called.| Constructor and Description |
|---|
ElapsedTimer(LongConsumer handler)
Create an instance with a handler to be called with the total elapsed time.
|
public ElapsedTimer(LongConsumer handler)
handler - called when the timer has been closed.public void close()
close in interface AutoCloseableCopyright © 2016 Atlassian. All rights reserved.