/// <summary> /// Check function to limit output frequency, when outputting to console. /// </summary> /// <returns></returns> public bool ShouldUpdate() { var update = false; lock (UpdateLock) { if (DateTime.UtcNow >= LastUpdated.AddSeconds(UpdateFrequencySeconds)) { LastUpdated = DateTime.UtcNow; update = true; } } return(update); }