From bcf0fb7a5cb6d9865b73659929a65e3d27c13a5b Mon Sep 17 00:00:00 2001 From: nikzori Date: Thu, 6 Mar 2025 10:18:06 +0300 Subject: [PATCH] switched to Stopwatch for timers for more reliability --- Datasheet.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Datasheet.cs b/Datasheet.cs index 43ba283..5422fb5 100644 --- a/Datasheet.cs +++ b/Datasheet.cs @@ -244,8 +244,9 @@ namespace Gidrolock_Modbus_Scanner async Task PollEntry(Entry entry) { bool res = false; - Modbus.ReadRegAsync(modbusID, (FunctionCode)entry.registerType, entry.address, entry.length); isAwaitingResponse = true; + Modbus.ReadRegAsync(modbusID, (FunctionCode)entry.registerType, entry.address, entry.length); + stopwatch.Restart();