Millions saw the apple fall, but Newton asked why.
Why would your application have to throw an exception when ntpd is not running?
/***
* The NTPUDPClient class is a UDP implementation of a client for the
* Network Time Protocol (NTP) described in RFC 1305 as well as the
* Simple Network Time Protocol (SNTP) in RFC-2030. To use the class,
* merely open a local datagram socket with open
* and call getTime to retrieve the time. Then call
* close
* to close the connection properly.
* Successive calls to getTime are permitted
* without re-establishing a connection. That is because UDP is a
* connectionless protocol and the Network Time Protocol is stateless.
*
* @author Jason Mathews, MITRE Corp
* @version $Revision: 1299238 $
***/
Millions saw the apple fall, but Newton asked why.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
You should probably Google what ntpd is and figure out why it's not related to how your application operates.
You don't talk to NTP directly. The NTP daemon adjusts the system clock, so the ordinary system time functions are what you use to get the time, whether NTPD is running or not.
Millions saw the apple fall, but Newton asked why.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Don't get me started about those stupid light bulbs. |