From 743c55d79198bf40573d38e0bd04e86da5934f4d Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Fri, 10 Jan 2025 13:33:33 +1100 Subject: [PATCH] FlightData: UtcNow update --- GCSViews/FlightData.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GCSViews/FlightData.cs b/GCSViews/FlightData.cs index 47ef4a877c..0abe96d48d 100644 --- a/GCSViews/FlightData.cs +++ b/GCSViews/FlightData.cs @@ -69,7 +69,7 @@ public partial class FlightData : MyUserControl, IActivate, IDeactivate /// DateTime lastmapposchange = DateTime.MinValue; - DateTime lastscreenupdate = DateTime.Now; + DateTime lastscreenupdate = DateTime.UtcNow; RollingPointPairList list1 = new RollingPointPairList(1200); CurveItem list1curve; PropertyInfo list1item; @@ -5324,14 +5324,14 @@ private void txt_messagebox_TextChanged(object sender, EventArgs e) private void updateBindingSource() { // run at 10 hz. - if (lastscreenupdate.AddMilliseconds(100) < DateTime.Now) + if (lastscreenupdate.AddMilliseconds(100) < DateTime.UtcNow) { lock (updateBindingSourcelock) { // this is an attempt to prevent an invoke queue on the binding update on slow machines if (updateBindingSourcecount > 0) { - if (lastscreenupdate < DateTime.Now.AddSeconds(-5)) + if (lastscreenupdate < DateTime.UtcNow.AddSeconds(-5)) { updateBindingSourcecount = 0; } @@ -5407,7 +5407,7 @@ private void updateBindingSourceWork() //if the tab detached wi have to update it if (tabQuickDetached) MainV2.comPort.MAV.cs.UpdateCurrentSettings(bindingSourceQuickTab.UpdateDataSource(MainV2.comPort.MAV.cs)); - lastscreenupdate = DateTime.Now; + lastscreenupdate = DateTime.UtcNow; } catch (Exception ex) {