```csharp public static class TimerManager { public static System.Timers.Timer aTimer; public static System.Timers.Timer bTimer; public static DateTime TimeStart { get; set; } public static void SetGameTimer() { SetTimerGame(); SetTimerAlert(); } private static void SetTimerGame() { // Create a timer with a two second interval. aTimer = new System.Timers.Timer(RedBlue.Instance.Configuration.Instance.matchTimems); TimeStart = DateTime.Now; // Hook up the Elapsed event for the timer. aTimer.Elapsed += OnTimedEvent; aTimer.AutoReset = false; aTimer.Enabled = true; } private static void SetTimerAlert() { // Create a timer with a two second interval. aTimer = new System.Timers.Timer(1000); // Hook up the Elapsed event for the timer. aTimer.Elapsed += OnTimedAlert; aTimer.AutoReset = true; aTimer.Enabled = true; } private static void OnTimedAlert(object sender, ElapsedEventArgs e) { TimeSpan timeLeft = DateTime.Now - TimeStart; foreach (SteamPlayer Steamplayer in Provider.clients) { if (timeLeft.Seconds <= 9) { EffectManager.sendUIEffectText(34, Steamplayer.transportConnection, false, "timer", $"{timeLeft.Minutes}:0{timeLeft.Seconds}"); } else { EffectManager.sendUIEffectText(34, Steamplayer.transportConnection, false, "timer", $"{timeLeft.Minutes}:{timeLeft.Seconds}"); } } } private static void OnTimedEvent(object sender, ElapsedEventArgs e) { UnturnedChat.Say("Come on guys! You need to hurry up!"); GameManager.EndGame("No"); } public static void StopGameTimer() { aTimer.Enabled = false; bTimer.Enabled = false; } } ```