Time: follow NTP, NTS and PTP servers, and serve all three

- internal/timesync: a clock that follows time servers (the median of
  their offsets) and can set the system clock; an NTP server with NTS;
  an NTS-KE server; a PTP grandmaster (multicast, and unicast
  negotiation) and a PTP client; kernel or network-card timestamps.
- [time], [ntp], [nts] and [ptp] sections, the UDP ports bound as root
  and handed down, and bbs time to ask servers once.
- Go 1.26 (facebook/time, the protocols' packets, needs it).
- Tested against chrony 4.5 (NTP and NTS, both ways) and linuxptp 4.0
  (multicast and unicast, both ways).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUxvTP6EhwNZTADjqy
This commit is contained in:
Claude committed 2026-11-08 15:09:57 +00:00
1 parent 0c5cc56c2f
commit 831e06bd0e
18 files changed
+487 -61

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
site:
uses: D-Modem/brand/.github/workflows/site.yml@main
with:
go-version: "1.24"
go-version: "1.26"
prepare: |
go run ./internal/confedit/refdoc
git diff --exit-code docs/wiki/Configuration-Reference.md || { echo "::error::docs/wiki/Configuration-Reference.md is out of date: go generate ./internal/confedit"; exit 1; }