Duration Class

Duration objects may be created using the durationFactory method of the Listener object. For more information about creating and using Durations, see the topics in the section Measuring Elapsed Time with Durations.

Constructor
durationFactory - Creates a Duration object for the Listener.
Methods
start - Indicates the beginning of the time interval that is to be measured (accumulated).
stop - Once the recording interval has completed, stop is called to calculate the time that has passed since start was called. The elapsed time (nanoseconds) is recorded to the current Accumulator and returned by this method. In addition, stop may be called in a manner which causes the value of the associated Event counter to be incremented as well.
See Also
Accumulator Class
Listener Class