12-05-2018, 02:35 PM
My system time synced yesterday and the time jumped forward 4seconds.
This dinged my driver which uses Time.GetCurStamp() to calculate CommPort.ReadByte(, WaitFor) times.
If I modify my code to use GetCurMillis  to calculate WaitFor (careful not to get bitten by wrap-around).  Will I be immune to system time changes?
Thanks -- Bob
P.S.  I supposed it is possible that CommPort.ReadByte *itself* will not WaitFor the correct amount of time if there is a system time change, so maybe I'm wasting my time trying to fix this.  I have increased the frequency of time synchronization so hopefully less of a probably anyway...
This dinged my driver which uses Time.GetCurStamp() to calculate CommPort.ReadByte(, WaitFor) times.
If I modify my code to use GetCurMillis  to calculate WaitFor (careful not to get bitten by wrap-around).  Will I be immune to system time changes?
Thanks -- Bob
P.S.  I supposed it is possible that CommPort.ReadByte *itself* will not WaitFor the correct amount of time if there is a system time change, so maybe I'm wasting my time trying to fix this.  I have increased the frequency of time synchronization so hopefully less of a probably anyway...