mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Fixed heartbeat timer check
This commit is contained in:
parent
15c056f11b
commit
2c71196fce
@ -157,7 +157,7 @@ public class DeviceUpdateTrigger : AbstractUpdateTrigger, IDeviceUpdateTrigger
|
|||||||
while (!UpdateToken.IsCancellationRequested)
|
while (!UpdateToken.IsCancellationRequested)
|
||||||
if (HasDataEvent.WaitOne(Timeout))
|
if (HasDataEvent.WaitOne(Timeout))
|
||||||
LastUpdateTime = TimerHelper.Execute(() => OnUpdate(), UpdateFrequency * 1000);
|
LastUpdateTime = TimerHelper.Execute(() => OnUpdate(), UpdateFrequency * 1000);
|
||||||
else if ((HeartbeatTimer > 0) && (LastUpdateTimestamp > 0) && ((Stopwatch.GetTimestamp() - LastUpdateTimestamp) > HeartbeatTimer))
|
else if ((HeartbeatTimer > 0) && (LastUpdateTimestamp > 0) && (TimerHelper.GetElapsedTime(LastUpdateTimestamp) > HeartbeatTimer))
|
||||||
OnUpdate(new CustomUpdateData().Heartbeat());
|
OnUpdate(new CustomUpdateData().Heartbeat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user