RTEMS Logo

RTEMS 4.9.2 On-Line Library


Time Synchronization Using NTP

PREV UP NEXT Bookshelf RTEMS Network Supplement

3.4.6: Time Synchronization Using NTP

int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);

If the interval argument is 0 the routine synchronizes the RTEMS time-of-day clock with the first NTP server in the rtems_bsdnet_ntpserve array and returns. The priority argument is ignored.

If the interval argument is greater than 0, the routine also starts an RTEMS task at the specified priority and polls the NTP server every `interval' seconds. NOTE: This mode of operation has not yet been implemented.

On successful synchronization of the RTEMS time-of-day clock the routine returns 0. If an error occurs a message is printed and the routine returns -1 with an error code in errno. There is no timeout -- if there is no response from an NTP server the routine will wait forever.


PREV UP NEXT Bookshelf RTEMS Network Supplement

Copyright © 1988-2008 OAR Corporation