In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:

> 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?

Perhaps
  http://en.wikipedia.org/wiki/Network_Time_Protocol
can be of some help.

-- 
  Hans Aberg
-- 
comp.lang.c.moderated - moderation address: [EMAIL PROTECTED] -- 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.

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.isc.org/mailman/listinfo/questions

Reply via email to