Esempio n. 1
0
 public MetricTimer(TimeSpan interval, SensorCollector collector, IWriteMetrics writer)
 {
     _timer = new Timer(interval.TotalMilliseconds)
     {
         AutoReset = true
     };
     _timer.Elapsed += ReportMetrics;
     _collector      = collector;
     _writer         = writer;
 }
Esempio n. 2
0
 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();
 }