Initialize this scoped guard to record elapsed time using the specified collector.
Declared in <balm_stopwatchscopedguard.h>
explicit
StopwatchScopedGuard(
Collector* collector,
Units timeUnits = k_SECONDS);
Optionally specify the timeUnits in which to report elapsed time. If collector is 0 or collector->category().enabled() == false, this object will be inactive (i.e., will not record any values). The behavior is undefined unless collector == 0 || collector->metricId().isValid(). Note that timeUnits indicates the scale of the double value reported by this guard, but does not affect the precision of the elapsed time measurement.
| Name | Description |
|---|---|
| collector | collector used to record elapsed time |
| timeUnits | units in which to report elapsed time (optional) |