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.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
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.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
We don't have time to be charming! Quick, read this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
|