I am currently writing an NTP client and server in Java. I am calculating the offset and round trip delay using the NTP timestamps. I should point out that i am calculating these for the seconds (first 32 bits) and the fractions (second 32 bits) separately. I am getting offset results such as 0 seconds and 1859395165 fractions.
My question is how can I use these offsets to print out what my system time would be if it was adjusted according to the given offset?
I was thinking that I could just add the fractions onto the fractions part of a timestamp for my systems current time, but if the sum of the fractions were greater than 1 second I believe I would encounter problems as my seconds would then be incorrect.