protected override async Task Process() { var delay = 10; if ((DateTime.UtcNow - timestamp).TotalSeconds < _cfg.ramCountIntensity) { var timeUntilNextExecution = _cfg.ramCountIntensity - (DateTime.UtcNow - timestamp).TotalMilliseconds; if (timeUntilNextExecution > delay) { delay = (int)timeUntilNextExecution; } } await Task.Delay(delay); _pm.TryUpdateRamPerformanceCounter(); timestamp = DateTime.UtcNow; }