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
* 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 $
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.