1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Use TIMESYNC and log the adjustment

Discussion in 'Plugins' started by Steve Fabian, May 25, 2012.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Vince:
    How do I save the adjustment report from TIMESYNC command of sysutils.dll?

    Currently I keep a log to learn whether or not my reset interval is too long or too short by using automachron. However, automachron is not Vista/Win7 compatible, and its author disappeared from the 'net. I want to use a command executed periodically. BTW, is it better to have a normally dormant TCC instance (e.g., using DELAY), or to have a service? Automachron is the former...
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    Do you mean this report?
    Code:
    Client send time: (UTC) 2012/06/01  18:08:19.166
    Server recv time: (UTC) 2012/06/01  18:08:19.195
    Server send time: (UTC) 2012/06/01  18:08:19.195
    Client recv time: (UTC) 2012/06/01  18:08:19.224
    You can redirect it to a file.

    Use a scheduled task.

    I also have a TSYNC.EXE which gives a more useful (?) report if you want to keep track of the adjustments.
    Code:
    tsync time-a.nist.gov  auto
    Time server: time-a.nist.gov (129.6.15.28)
     
    Estimated round trip time:    85 ms
     
    Estimated local time offset: -0.020 seconds
    To get this info from the first snippet above, ...

    1. the RTT would be (client_rec - client_snd) = 58 ms
    2. from the client's point of view, the "middle" of the transaction was at the average of client_snd and client_rec (client_snd plus half of RTT), which was at 18:08:19.194. Calculating similarly, from the server's point of view, the middle was at 18:08:19.195. Assuming the round trip was symmetric in time (the best you can do), the client is 0.001 slow (local offset -0.001). The error in sync'ing the time can be as much as half the RTT (but that would require a very lopsided trip to/from the server).

    Time sync programs do all that internally. The timestamps used in NTP use, as units, 2^-32 seconds.
     

Share This Page