fix: Fixes timer remaining count (#1908)

This commit is contained in:
Kamron Batman 2024-08-06 16:25:21 -07:00 committed by GitHub
parent 28860b7f53
commit 808e721e3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,6 +70,7 @@ public partial class Timer
public TimeSpan Interval { get; set; } public TimeSpan Interval { get; set; }
public int Index { get; private set; } public int Index { get; private set; }
public int Count { 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 bool Running { get; private set; }
public TimerProfile GetProfile() => !Core.Profiling ? null : TimerProfile.Acquire(ToString() ?? "null"); public TimerProfile GetProfile() => !Core.Profiling ? null : TimerProfile.Acquire(ToString() ?? "null");