AW: [En-Nut-Discussion] Synching Calldirect using NutOS
Lars Andersson
lakab at telia.com
Mon Oct 13 20:35:52 CEST 2003
Hi,
a simple hack to pick up time of day in UTC from a NTP server
I call it something like
#define SNTP_IP1 "192.36.144.22"
u_long NowTimeStamp;
TIMEDATE td;
if (SNTP_get_stamp(&NowTimeStamp, (u_long)inet_addr(SNTP_IP1)))
{
stamp2timedate(NowTimeStamp, &td);
...good response...
}
else
...no joy... (Try again maybe?)
(Wish I could get current date too ;-)
Regards,
Lars H. Andersson
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SNTP.c
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20031013/aa6f3e82/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sntp.h
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20031013/aa6f3e82/attachment.h>
More information about the En-Nut-Discussion
mailing list