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) {