public MetricTimer(TimeSpan interval, SensorCollector collector, IWriteMetrics writer) { _timer = new Timer(interval.TotalMilliseconds) { AutoReset = true }; _timer.Elapsed += ReportMetrics; _collector = collector; _writer = writer; }
public MetricTimer(TimeSpan interval, IGiveSensors collector, IWriteMetrics writer) { _timer = new Timer(interval.TotalMilliseconds) { AutoReset = true }; _timer.Elapsed += ReportMetrics; _collector = collector; _writer = writer; _stopwatch = new Stopwatch(); }