嵌入式设备中,有些需要得到实时的比较准确的时间,以和服务器或是设备之间进行时间同步,但是很多嵌入式设备又不能通过人工设置时间的方式来同步时间,需要自动从网络上获取时间,这就需要用到NTP。NTP是网络时间协议(Network Time Protocol)的简称,它是用来同步网络中各个计算机设备的时间的协议。目前有第三方的代码可以支持NTP,本文讲诉ntpclient的用法。
ntpclient is an NTP(RFC-1305)client for unix-alike computers.Its functionality is a small subset of xntpd,but IMHO performs better (or at least has the potential tofunction better) within that limited scope. Since it is muchsmaller than xntpd, it is also more relevant for embedded computers.
ntpclient的下载地址是: ntpclient下载地址