Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetCurMillis immune to system time change?
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...

Messages In This Thread
GetCurMillis immune to system time change? - by rbroders - 12-05-2018, 02:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  System monitoring? Spot 7 359 04-26-2023, 06:31 PM
Last Post: kblagron
  Am I misusing System Equals? Spot 6 1,066 01-30-2022, 07:35 PM
Last Post: Spot
  Triggered Event only works every second time znelbok 2 1,302 10-27-2020, 12:05 PM
Last Post: znelbok
  Is there a way to change the listening port for the CQC server? ghurty 3 1,512 04-23-2020, 05:54 PM
Last Post: Dean Roddey
  Unhandled system exception in the GUI Thread gReatAutomation 9 2,737 03-23-2020, 01:03 PM
Last Post: Dean Roddey
  Handling Daylight Savings Time kblagron 10 3,350 03-17-2020, 07:35 AM
Last Post: Dean Roddey
  Timers Driver / Field Time Image / Seconds gReatAutomation 1 1,383 03-16-2020, 05:48 PM
Last Post: Dean Roddey
  LogicServer Elapsed Time and Triggered Event gReatAutomation 6 2,804 08-17-2019, 07:53 AM
Last Post: gReatAutomation
  Time formatting RunTime Time Variable? gReatAutomation 5 2,493 08-14-2019, 05:23 AM
Last Post: gReatAutomation
  Use UI to alter scheduled event time IVB 1 1,350 07-09-2019, 08:42 PM
Last Post: IVB

Forum Jump:

Users browsing this thread: 1 Guest(s)