Once the recording interval for a Duration object has completed, stop is called to calculate the time that has passed since the start method was executed. The elapsed time is then recorded (nanoseconds) to the current Accumulator and returned.
void stop([optional] boolean incrementCount);
Listener listener = new Listener("sampleApp", "4.0");
Duration readTime = listener.durationFactory("duration of read");
readTime.start();
...
readTime.stop(true);
...