Windows的话,使用的SNTP协议,只要开启w32time这个服务即可。
另外在注册表里要配置下相应的选项:
Run “regedit” to open Registry Editor with administration privilege:
Step1:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
Edit it and type NTP as its value.
Step2:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags
Edit it and input 5 (decimal) as its value
Step3:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\ Enable
Edit it and input 1 (decimal)as its value.
Step4
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\ NtpServer
Edit it and input “IP, 0x1”, IP: DNS, PDC are all available, or this parameter can be set as standard time source, like time.windows.com, 0x1
“net stop w32time” ,then “net start w32time”
去服务里打开
http://blog.sina.com.cn/s/blog_498f46270100eo95.html
基本上关于NTP的都在里面了~