Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Commit

Permalink
Fixed update timer
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlOfDuty committed Sep 24, 2018
1 parent adeaea1 commit 23cb054
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SCPDiscordPlugin/StatusUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public StatusUpdater(SCPDiscordPlugin plugin)
Stopwatch stopWatch = Stopwatch.StartNew();
public void OnUpdate(UpdateEvent ev)
{
if(!stopWatch.IsRunning)
{
stopWatch.Start();
}
ticks++;
if (stopWatch.ElapsedMilliseconds >= 5000 && plugin.hasConnectedOnce)
{
Expand Down

0 comments on commit 23cb054

Please sign in to comment.