libmsntp is a full-featured, compact, portable SNTP library. You can get it on github.
SNTP is a simplified version of NTP, 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 Cambridge’s High Performance Computing Facility for providing the msntp source to the public.
libmsntp is supported on most flavors of *nix. See the Makefile and README.msntp in the tarball for more information.
libmsntp is distributed under the GPL, and has been included in a number of Linux distributions. Copyright 2005 Ryan Barrett, 1996-2000 N.M. Maclaren.