bg_ie@yahoo.com *nix forums beginner
Joined: 20 Jun 2006
Posts: 9
|
Posted: Mon Jul 10, 2006 11:11 pm Post subject:
Calculating NTP timestamp in C program
|
|
|
Hi,
I wish to write a C program which obtains the system time and hence
uses this time to print out its ntp equivalent.
Am I right in saying that the following is correct for the seconds part
of the ntp time?
long int ntp.seconds = time(NULL) + 2208988800;
How might I calculate the fraction part?
Thanks very much for your help,
Barry.
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry. |
|