public void AddActivationSpan(ActivationSpan span) { lock (_activationSpans) _activationSpans.Add(span); var now = DateTime.Now; // Active time if (now >= span.Start && now < span.End) { this.Start(); } // Inactive time else { this.End(); } }