TimeSpanMetric

References
Provides access to a disposable duration metric.

Constructors

TimeSpanMetric

#
Create a new timer id.
public TimeSpanMetric(
name,
Name of metric.
threshold
Reporting threshold.
)

Properties

Elapsed

#
Gets the total duration so far logged.
public TimeSpan Elapsed { get; }

Name

#
Gets the name of this metric.
public string Name { get; }

Threshold

#
Gets the threshold reporting level. If the measured elapsed time does not exceed the threshold, no timer will be logged.
public TimeSpan Threshold { get; }

Methods

Clear

#
Stop logging and clear the accumulated duration.
public void Clear()

Dispose

#
Dispose this class.
public void Dispose()

Pause

#
Pause logging.
public void Pause()

Start

#
Starts, or resumes, logging.
public void Start()