Enables the Listener to create a Duration
object on the stack. The Listener does not keep pointers to the objects returned
by this function, therefore, Duration objects created in this manner should
be deleted when they will no longer be used. Note that it is also possible to
create Duration objects using the new
operator.
Duration Accumulators should be named "duration" because the Manager Dashboard looks for this Accumulator name.
Duration elapsedTime(Accumulator *AccumulatorObject);
Listener *listener = new Listener("sampleApp", "4.0",
NULL, false);
Container *store = listener->lookupContainer("storeName");
Event *creations = store->lookupEvent(PCHeventClass.RPC, "document
creations");
Accumulator *numCreations = creations->lookupAccumulator("number of
creations");
Duration duration = listener->durationFactory(numCreations);
...