explaingit

benleikin/pitime

Analysis updated 2026-05-18

17PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A DIY GPS based time server for a Raspberry Pi that syncs your local network clock to within microseconds, far more precise than standard internet time sync.

Mindmap

mindmap
  root((PiTime))
    What it does
      GPS time server
      Local network sync
      Nanosecond accuracy
    Tech stack
      Raspberry Pi
      chrony
      GPIO PPS
    Use cases
      Home lab NTP
      PTP for AV gear
      Learning timing
    Audience
      Hobbyists
      Network admins

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a home lab NTP server synced directly to GPS satellites.

USE CASE 2

Serve sub-microsecond PTP time to audio, video, or industrial equipment on a local network.

USE CASE 3

Learn how a GPS pulse-per-second signal disciplines a system clock using chrony.

What is it built with?

PythonRaspberry PichronyGPIONTPPTP

How does it compare?

benleikin/pitime0petru/sentimoalingalingling/akasha-wechat
Stars171717
LanguagePythonPythonPython
Setup difficultymoderatemoderatehard
Complexity3/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires assembling GPS hardware wired to GPIO pins on a Raspberry Pi 4.

MIT license lets you use, modify, and distribute the project freely as long as you keep the copyright notice.

In plain English

PiTime turns a Raspberry Pi into a highly accurate time server that takes its time signal directly from GPS satellites, costing around $90 in total hardware. Most computers and routers get their time from internet time servers, which introduces small delays along the network path. A GPS-disciplined server skips the internet middle step: the GPS module receives time signals from satellites and the Pi distributes that time to other devices on your local network with much higher precision. The GPS module connects to the Pi's GPIO pins (the row of small metal pins on the board). One of those pins receives a pulse-per-second signal, a precise electrical tick that arrives exactly once per second from the satellite timing circuit. Software called chrony reads that pulse and uses it to keep the system clock locked to within a fraction of a microsecond. The README shows measured results from a running instance: typical offset of 100 to 1000 nanoseconds and a standard deviation of about 200 nanoseconds, using a $10-15 module from Amazon. The server can distribute this precise time to other devices on your home or office network in two ways. The first is NTP (Network Time Protocol), the same system all computers already use when syncing time over the internet. The second is PTP (Precision Time Protocol), a more precise protocol used in professional audio, video, and industrial settings that can achieve sub-microsecond accuracy on a local network. There is also an optional NTS (Network Time Security) mode that adds cryptographic authentication when serving time over the internet. A web dashboard built as a single Python file with no external dependencies shows a live sky view of visible satellites, current offset readings, and historical jitter charts. The project includes installation instructions, example configuration files, and an optional script that converts other machines on the network to use the Pi as their time source. The project requires a Raspberry Pi 4 (or similar), a GT-U7 or compatible GPS module, and a 32GB microSD card. Setup instructions are in a separate INSTALL.md file. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me wire a GT-U7 GPS module to a Raspberry Pi 4's GPIO pins for a PiTime build.
Prompt 2
Walk me through installing chrony and configuring it to use a PPS signal from a GPS module.
Prompt 3
Explain how NTP and PTP differ and which one I should serve from a Raspberry Pi time server.
Prompt 4
Show me how to set up the PiTime web dashboard to view satellites and jitter charts.

Frequently asked questions

What is pitime?

A DIY GPS based time server for a Raspberry Pi that syncs your local network clock to within microseconds, far more precise than standard internet time sync.

What language is pitime written in?

Mainly Python. The stack also includes Python, Raspberry Pi, chrony.

What license does pitime use?

MIT license lets you use, modify, and distribute the project freely as long as you keep the copyright notice.

How hard is pitime to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is pitime for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.