stop Method

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.

Syntax
void stop([optional] boolean incrementCount);
Parameters
incrementCount - [in] Optional Boolean value (default is false) that indicates whether to increment the associated Event object counter. When set to true, the second parameter of the recordValue method of the associated Accumulator is also set to true. This causes the counter of the Event associated with the Accumulator to automatically be incremented after the elapsed time is recorded.
Example
Listener listener = new Listener("sampleApp", "4.0");
Duration readTime = listener.durationFactory("duration of read");
readTime.start();
...
readTime.stop(true);

...
See Also
Accumulator Class
Duration Class
Listener Class
recordValue Method
start Method