GSoC/GCI Archive
Google Summer of Code 2013

Network Time Foundation

Web Page:

Mailing List:

We do Network Time:

  • NTP (Network Time Protocol) the NTP Project,
  • PTP (Precision Time Protocol), via and
  • the GPS Daemon,
  • RADclock,


  • Gsoc 2013 Proposal : System clock startup analysis Ntpd program is an operating system daemon which sets and maintains system time of the day in synchronism with internet standard time servers. It operates by exchanging one or more messages with one or more configured servers at designated poll intervals. Ntpd currently applies small corrections (-500, 0 or 500 ppm discrete corrections) to the system time every second. If ntpd uses adjtime(), it updates the system clock every second. But some clock implementations do not provide small update to system clock. So there is a clock model which provides a kernel discipline called ntp_adjtime() which is used by Ntpd to adjust several parameters of the clock. References : and There are two aspects to time corrections, applying an offset and adjusting the clock-frequency. The idea here is to perform a startup analysis of the time offset and the frequency correction that needs to be applied. The objective is to, first collect the data from N servers, using that calculate the offset and frequency adjustment that needs to be done.
  • Improve ./scripts directory in NTP distribution NTP distribution contains ./scripts/ directory along with ntp daemon and client software. This directory stores small scripts that proved useful when managing, monitoring or developing ntp suite. Quick search reveals that this directory contains approximately 50 scripts written in perl, shell and awk. Some of these scripts are outdated and broken or using deprecated tools. The goals of the project are to review the whole ./scripts/ directory, fix broken scripts where it makes sense, improve existing scripts by improving perl codebase using modern perl practices (mainly usage of strict pragma), adding new features and standardizing command line arguments. The output of the project will also be documentation for each script. I will be also dealing with writing tag translators between multiple documentation formats (texi, mdoc, man, .info and html) which ntp uses for documentation. Another goal of the project is to establish a testing framework for test automation on various platforms for scripts directory.
  • Improving NTP's logging/debugging system Redesign/Change NTP's logging/debugging system. Write a common debugging/logging interface for NTP.
  • New Timestamp Format and API There are different timescales being used everywhere, like UTC and GPS. When user application gets timestamp from system, it can’t tell which timescale the system is using. What’s more, the timestamp being used may step backward in cases such as system time is set manually, which could be disaster to time-sensitive applications. So this idea aim to design and implement a new timestamp format and API that will never step backward and provide an easy-to-use interface for programs to fetch timestamp and process with it.
  • Testing of NTP and study how it works NTP has a unit test framework by a former GSoC student, using googletest. There are still many codes that are not covered by this framework. This project writes unit tests for those codes.