Commit becf27b2 authored by Peter Waher's avatar Peter Waher

Clock synchronization example

parent 4e6bf898
......@@ -42,3 +42,21 @@ The latency l is therefore approximately half of Δt<sub>1</sub>+Δt<sub>2</sub>
To decrease the variation of network and process activity, an average value over a time window should be used. The internal clocks of the client and server can be
considered much more stable than the latency in the network. The bulk of the variance in the measured l and Δt can therefore be attributed to variance in the network,
as well as concurrent processes and loads on the client and clock source.
Examples
------------------
A simple clock difference request can look as follows:
<iq type='get' id='3' to='source@server/resource'>
<clock xmlns='urn:ieee:iot:synchronization:1.0'>2018-07-01T12:31:07.1627163Z</clock>
</iq>
The source responds:
<iq id='3' type='result' to='client@server/resource' from='source@waher.se/resource'>
<clock xmlns='urn:ieee:iot:synchronization:1.0'>2018-07-01T12:31:07.2642974Z</clock>
</iq>
**Note**: The `xs:dateTime` data type allows for arbitrary resoulution of the seconds part. In this example, a resolution of 100 ns has been used,
conforming to the capabilities of systems having an on-board high-resolution clock.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment