[#BloombergLP-balm-StopwatchScopedGuard-2constructor-022] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/StopwatchScopedGuard.adoc[StopwatchScopedGuard]::StopwatchScopedGuard :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<balm_stopwatchscopedguard.h>` Initialize this scoped guard to record an elapsed time to the specified `metricId`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-05.adoc[StopwatchScopedGuard]( xref:BloombergLP/balm/MetricId.adoc[MetricId] const& metricId, xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0); ---- [.small]#xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-05.adoc[_» more..._]# Initialize this scoped guard to record elapsed time using the specified `collector`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-01.adoc[StopwatchScopedGuard]( xref:BloombergLP/balm/Collector.adoc[Collector]* collector, xref:BloombergLP/balm/StopwatchScopedGuard/Units.adoc[Units] timeUnits = k_SECONDS); ---- [.small]#xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-01.adoc[_» more..._]# Initialize this scoped guard to record elapsed time using the specified `metric`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-020.adoc[StopwatchScopedGuard]( xref:BloombergLP/balm/Metric.adoc[Metric]* metric, xref:BloombergLP/balm/StopwatchScopedGuard/Units.adoc[Units] timeUnits = k_SECONDS); ---- [.small]#xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-020.adoc[_» more..._]# Initialize this scoped guard to record an elapsed time to the specified `metricId` using the specified `timeUnits`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-0e.adoc[StopwatchScopedGuard]( xref:BloombergLP/balm/MetricId.adoc[MetricId] const& metricId, xref:BloombergLP/balm/StopwatchScopedGuard/Units.adoc[Units] timeUnits, xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0); ---- [.small]#xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-0e.adoc[_» more..._]# Initialize this scoped guard to record an elapsed time to the metric identified by the specified `category` and `name`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-0f.adoc[StopwatchScopedGuard]( char const* category, char const* name, xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0); ---- [.small]#xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-0f.adoc[_» more..._]# Initialize this scoped guard to record an elapsed time to the metric identified by the specified `category` and `name` using the specified `timeUnits`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-09.adoc[StopwatchScopedGuard]( char const* category, char const* name, xref:BloombergLP/balm/StopwatchScopedGuard/Units.adoc[Units] timeUnits, xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]* manager = 0); ---- [.small]#xref:BloombergLP/balm/StopwatchScopedGuard/2constructor-09.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *metricId* | identity of the metric to record | *manager* | metrics manager used to provide the collector (optional) | *collector* | collector used to record elapsed time | *timeUnits* | units in which to report elapsed time (optional) | *metric* | metric used to record elapsed time | *category* | null‐terminated metric category name | *name* | null‐terminated metric name |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#