TimeSpanMetric

References
Provides access to a disposable duration metric.

Constructors

TimeSpanMetric

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

Properties

Elapsed

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

Name

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

Threshold

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

Methods

Clear

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

Dispose

#
public void Dispose()
Dispose this class.

Pause

#
public void Pause()
Pause logging.

Start

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