MCPcopy Index your code
hub / github.com/facebook/time

github.com/facebook/time @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
3,556 symbols 13,900 edges 413 files 1,861 documented · 52% 2 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Time

lint test codecov Go Report Card GitHub go.mod Go version GoDoc License

Contents

Documentation

Collection of Meta's Time Libraries such as NTP and PTP

cmd

All executables provided by this repo.

NTP

NTP-specific libraries, including protocol implementation.

PTP

PTP-specific libraries, including protocol implementation.

Leaphash

Utility package for computing the hash value of the official leap-second.list document

leapsectz

Utility package for obtaining leap second information from the system timezone database

PHC

Library to work with PTP Hardware Clock (PHC).

Timestamp

Library to work with NIC hardware/software timestamps.

oscillatord

Implementation of monitoring protocol used by Orolia oscillatord.

Calnex

Command line tool and library for a Calnex Sentinel device.

Caliper

Command line tool for parsing Luciol OTDR trace files when measuring system/cable latencies of Huber-Suhner GNSS-over-fiber systems

sa53

Command line tool and library for the Microchip SA53 atomic clock on Celestica time cards.

fbclock

Client C library and Go daemon to provide TrueTime API based on PTP time.

servo

Pi servo library

clock

Wrapper around CLOCK_ADJTIME syscall

NTRIP

NTRIP v1 SOURCE client library for pushing RTCM correction data to an NTRIP caster. Supports HTTP CONNECT proxy with TLS client certificate authentication.

ntripper

Command line tool that reads RTCM3 and UBX-RXM-RAWX data from an oscillatord Unix socket and pushes RTCM corrections to an NTRIP caster, generating MSM7 messages from raw observations when available.

RTCM

Parser and scanner for RTCM 10403.x (RTCM3) binary frames used for GNSS correction data. Includes CRC-24Q validation and stream synchronization.

License

time is licensed under Apache 2.0 as found in the LICENSE file.

Extension points exported contracts — how you extend this code

BinaryMarshalerTo (Interface)
BinaryMarshalerTo is an interface implemented by an object that can marshal itself into a binary form into provided []by [12 …
ptp/protocol/protocol.go
UDPConn (Interface)
UDPConn describes what functionality we expect from UDP connection [8 implementers]
ptp/simpleclient/client.go
UDPConn (Interface)
UDPConn describes what functionality we expect from UDP connection [8 implementers]
ptp/linearizability/linearizability_ptp.go
Check (Interface)
Check abstracts the checks to be executed [6 implementers]
calnex/verify/checks/check.go
Clock (Interface)
Clock is the iface for clock device controls [5 implementers]
ptp/sptp/client/clock.go
SerialReadWriter (Interface)
SerialReadWriter is the subset of serial.Port the protocol package uses. It lets callers wrap the underlying port with t [4 …
sa53/protocol/protocol.go
ServoController (Interface)
ServoController abstracts away servo [3 implementers]
phc/pps_source.go
Source (Interface)
Source provides an SA53 firmware image. Version reports the candidate version without downloading (so a dry run can comp [2 …
sa53/upgrade/upgrade.go

Core symbols most depended-on inside this repo

Close
called by 249
ptp/sptp/client/connection.go
Unix
called by 233
cmd/ntpcheck/checker/chrony.go
Duration
called by 166
ptp/protocol/types.go
Size
called by 141
sa53/firmware/firmware.go
Printf
called by 123
ntp/chrony/logger.go
Error
called by 113
phc/adjtime.go
Name
called by 108
calnex/verify/checks/check.go
Read
called by 91
phc/pps_source.go

Shape

Function 1,926
Method 1,090
Struct 403
TypeAlias 69
Interface 45
Class 17
FuncType 6

Languages

Go98%
C1%
C++1%

Modules by API surface

ntp/chrony/packet.go93 symbols
ptp/protocol/types.go60 symbols
calnex/api/api.go58 symbols
ptp/ptp4u/stats/stats.go51 symbols
phc/pps_mock_test.go50 symbols
ptp/protocol/protocol.go45 symbols
fbclock/fbclock.c37 symbols
ptp/linearizability/linearizability_ptp.go36 symbols
calnex/api/api_test.go36 symbols
ntp/chrony/packet_test.go35 symbols
ptp/sptp/client/stats.go34 symbols
ptp/ptp4u/server/subscription.go34 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add time \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact