From 808e721e3d811667f92072d713b5073f2c97284f Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:25:21 -0700 Subject: [PATCH] fix: Fixes timer remaining count (#1908) --- Projects/Server/Timer/Timer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/Server/Timer/Timer.cs b/Projects/Server/Timer/Timer.cs index aedb163cc..69b30ba9c 100644 --- a/Projects/Server/Timer/Timer.cs +++ b/Projects/Server/Timer/Timer.cs @@ -70,6 +70,7 @@ public partial class Timer public TimeSpan Interval { get; set; } public int Index { get; private set; } public int Count { get; private set; } + public int RemainingCount => Count == 0 ? int.MaxValue : Count - Index; public bool Running { get; private set; } public TimerProfile GetProfile() => !Core.Profiling ? null : TimerProfile.Acquire(ToString() ?? "null");