[#BloombergLP-balm-StopwatchScopedGuard-2constructor-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/StopwatchScopedGuard.adoc[StopwatchScopedGuard]::StopwatchScopedGuard :relfileprefix: ../../../ :mrdocs: Initialize this scoped guard to record an elapsed time to the metric, identified by the specified `category` and `name`, from the optionally specified `manager`. Optionally specify the `timeUnits` in which to report elapsed time. If `timeUnits` is not provided, the elapsed time will be reported in seconds. If `manager` is 0, use the `DefaultMetricsManager` instance. If no `manager` is supplied, and the default instance has not been created, this object will be inactive (i.e., it will not record any values); similarly, if the identified `category` is disabled, then this object will be inactive. The behavior is undefined unless `category` and `name` are null‐terminated. 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. == Synopsis Declared in `<balm_stopwatchscopedguard.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- StopwatchScopedGuard( char const* category, char const* name, xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#