in reply to Re^3: NTP Error
in thread NTP Error

Net::NTP is consistently faster.

That is kind of a given. If you trace you Net::NTP script, it executes 1176 lines:

C:\test>perl -d:Trace junk1001.pl >junk1001.log 2>&1 C:\test>wc -l junk1001.log 1176 junk1001.log

If you run your POE script, it executes 3575 lines:

C:\test>perl -d:Trace junk1000.pl >junk1000.log 2>&1 C:\test>wc -l junk1000.log 3575 junk1000.log

Just over 1000 of those lines -- the ones that run in Net::NTP -- are more or less identical between the two scripts.

The other 2400 in the POE script are the overhead of running POE.

Of course, those lines enable you to do many other things besides NTP...but there is no circumstance under which you would want to have a script doing any of those other things concurrently with synchronising your system clock; because the overhead would compromise the accuracy of the synchronisation.

Actually, if you want to synchronise your clock really accurately, even the overhead of Net::NTP is too much. Especially when the whole purpose of using udp is to allow a very low latency turnaround of the request and response; and the simplicity of coding that comes from udp sendto() and recvfrom() calls.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?