Time Synchronization Manager Service
The Time Synchronization Manager Service synchronizes client clocks with the configuration server’s clock.
Method
The Time Synchronization Manager Priority Service synchronizes time for a VTScada application as soon as the application is started. Clients then independently request time updates from the server both on startup and periodically (as defined by theTimeSyncUpdtItrvl application property). The server responds to these requests as they are received.
If synchronization with a centralized provider is required, configure the server to do so using the Windows® configuration tools.
The client transmits five update requests (in the form of GetTime calls) through RPC to the server. The server responds to each GetTime call with a SetTime RPC call that includes the server’s current time in UTC. The client calculates the round trip time for each request/response, and will select the most expedient (i.e. the shortest request/response time).
After the client chooses the shortest round trip response time, the client’s time delta from the server is calculated, taking the client’s timezone into consideration.
Delta Tolerance
The delta tolerance is equal to the round trip time, with 0.5 seconds as the minimum delta. The synchronization interval is 15 minutes (900 seconds), as defined by the TimeSyncUpdtItrvl application property.
If the time delta is 1 second, then the client’s clock is changed by 10 milliseconds every second. The client will then be in sync after 100 seconds, but any logs done on time won’t show any visible discontinuity. The client’s clock will immediately be adjusted if the delta exceeds 5 seconds.
Special Considerations for Time Adjustments
The following scenarios will cause the Time Synchronization Manager to abort a time adjustment to a client:
- If adjusting the client’s clock would result in rolling the client’s data back to a previous day, the time adjustment will not occur, as doing so would have a detrimental effect on data logging, especially at the first day of a month, as the rollback would then be to the previous month.
- The client’s clock will also not be adjusted if the delta from the server is less than a configurable tolerance (relative to the roundtrip time of the request). For example, if a roundtrip takes a whole second, the server’s timestamp will not be very precise, so the client’s clock will not be adjusted unless the delta is > 0.5 seconds.
- The client’s clock will not be adjusted if the roundtrip time exceeds 10 minutes.
- The client’s clock will not be adjusted if the server’s RPC queue (which takes priority) exceeds a user-defined value (as defined by the TimeSyncRPCQMax application property).
- No time synchronization will take place if the TimeSyncEnable application property is set to 0 (disabled).