libmsntp is a full-featured, portable, compact SNTP library. SNTP (RFC 2030) is a simplified version of NTP (RFC 1305), which allows precise synchronization of system clocks over a best-effort network.
libmsntp provides SNTP client and server functionality in a shared library with a simple API.
libmsntp is implemented as a thin layer on top of msntp, N.M. Maclaren's command-line SNTP utility. msntp is compact, straightforward, and elegant, and I'm indebted to Nick, and to the Cambridge High Performance Computing Facility, for providing the msntp source to the public.
To install, type "make install". You may need to be the superuser. libmsntp installs into /usr/local by default; to install to a different location, edit the Makefile and change the PREFIX variable.