stop Member Function

Once the recording interval for a Duration object has completed, stop is called to calculate the time that has passed since the start member function was executed. The elapsed time is then recorded (nanoseconds) to the current Accumulator and returned.

Syntax
unsigned __int64 stop([optional] bool incrementCounter);
Parameters
incrementCounter - [in] Optional Boolean value (default is false), which indicates whether to increment the associated Event object counter. When set to true, the second parameter of the recordValue member function 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", NULL, false);
Duration *readTime = listener->durationFactory("duration of read");
readTime->start(NULL);
...
unsigned __int64 totalRead = readTime->stop(true);

...
See Also
Accumulator Class
Duration Class
Listener Class
recordValue Member Function
start Member Function