# TimeSpanMetric class

Namespace: [Grasshopper2.Diagnostics](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.diagnostics.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class TimeSpanMetric : IDisposable
```

Provides access to a disposable duration metric.

## Constructors

- [TimeSpanMetric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/ctor.md): Create a new timer id.

## Properties

- [Elapsed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/elapsed.md): Gets the total duration so far logged.
- [Name](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/name.md): Gets the name of this metric.
- [Threshold](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/threshold.md): Gets the threshold reporting level. If the measured elapsed time does not exceed the threshold, no timer will be logged.

## Methods

- [Clear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/clear.md): Stop logging and clear the accumulated duration.
- [Dispose](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/dispose.md): Dispose this class.
- [Pause](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/pause.md): Pause logging.
- [Start](https://developer.rhino3d.com/api/gh2/type/grasshopper2.diagnostics.timespanmetric/start.md): Starts, or resumes, logging.
