43 lines
741 B
C#
43 lines
741 B
C#
using JD.Statistics.Metric;
|
|
|
|
namespace JD.Statistics
|
|
{
|
|
public abstract class TimerStatistic : Statistic
|
|
{
|
|
#region Variables
|
|
|
|
[Metric("Duration")]
|
|
private readonly TimerMetric m_timer;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
protected TimerStatistic() : this (true)
|
|
{
|
|
}
|
|
|
|
protected TimerStatistic(bool autoStart)
|
|
{
|
|
m_timer = new TimerMetric(autoStart);
|
|
}
|
|
|
|
public override void Dispose()
|
|
{
|
|
m_timer.Dispose();
|
|
|
|
base.Dispose();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public TimerMetric Timer
|
|
{
|
|
get { return m_timer; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|