\ File: timesync.spf \ Author: Nicholas Nemtsev \ Date: 11.04.2002 \ Modified: 08.01.2004 (leap-year bug) \ Description: Time synchronization by Time Protocol \ Usage: TP-SYNC: server-name \ user-value variables (use these after TP-SYNC): \ TP-SYNC-RESULT - 0 if ok, otherwise winsock error code \ TP-SYNC-DELAY - delay of server respond in ms \ Note: You must perform authorization. And user must have \ "Change the system time" privilege. \ --- Example: --- \ #( time_adjust \ OnceADay \ Rule: ONLINE? \ Action: \ TP-SYNC: time.nist.gov \ TP-SYNC-RESULT 0<> \ IF CLEAR-ONCE \ MSG: "Can't synchronize time" \ ELSE \ TMSG: "Time is synchronized." 10 \ THEN \ )# \ --- Time server list --- \ time.nist.gov \ clock.psu.edu \ finch.cc.ukans.edu \ ntp.css.gov \ ntp.lth.se \ ntp.maths.tcd.ie \ ntp0.cornell.edu \ ntp-1.ece.cmu.edu \ ntp-2.ece.cmu.edu \ ntp2a.mcc.ac.uk \ Rolex.PeachNet.EDU \ salmon.maths.tcd.ie \ sundial.columbia.edu \ time.nrc.ca \ timelord.uregina.ca \ timex.cs.columbia.edu \ Timex.PeachNet.EDU DECIMAL USER-VALUE TP-SYNC-RESULT USER-VALUE TP-SYNC-DELAY WINAPI: SetSystemTime KERNEL32.DLL USER