public MetricAggregator(CustomMetricsPoster poster, int seconds) { if (poster == null) { throw new ArgumentNullException("poster"); } _customMetricsPoster = poster; _timer = new Timer { Interval = TimeSpan.FromSeconds(seconds).TotalMilliseconds, }; _timer.Elapsed += Tick; _timer.Start(); }
public MetricAggregator(string apiKey, string instanceId = null, CustomMetricsPoster.IFailureCallback failureCallback = null) : this(new CustomMetricsPoster(apiKey, instanceId, failureCallback), 60) { }