Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/facebook/time
/ functions
Functions
3,016 in github.com/facebook/time
⨍
Functions
3,016
◇
Types & classes
540
↓ 5 callers
Function
findTimecardPCIAddrs
findTimecardPCIAddrs resolves the PCI addresses of all time cards by following the "device" symlink under each /sys/class/timecard/ocp<n>.
sa53/detect/detect.go:94
↓ 5 callers
Function
fmtThreshold
(warnThreshold any)
cmd/ptpcheck/cmd/diag.go:56
↓ 5 callers
Function
formNewDest
formNewDest generates new ip address using the rack prefix /64 of DestinationAddress by adding :face:face:0:$i to the ipv6
cmd/ziffy/node/sender_linux.go:373
↓ 5 callers
Function
ghostObs
(sv uint8)
rtcm/msm_encode_test.go:133
↓ 5 callers
Function
headerMarshalBinaryTo
headerMarshalBinaryTo is not a Header.MarshalBinaryTo to prevent all packets from having default (and incomplete) MarshalBinaryTo implementation throu
ptp/protocol/protocol.go:133
↓ 5 callers
Function
isChronyListening
(netFilePath string)
cmd/ntpcheck/checker/runner.go:59
↓ 5 callers
Function
isWriteError
(err error)
cmd/ntripper/main.go:282
↓ 5 callers
Function
leapSecondSmearing
(leaps []leapsectz.LeapSecond)
fbclock/daemon/daemon.go:165
↓ 5 callers
Method
logSent
couple of helpers to log nice lines about happening communication
ptp/simpleclient/client.go:458
↓ 5 callers
Function
makeFakeTimecardSysfs
--- detectGNSSSerialFromGlob (PCI BDF resolver) --- makeFakeTimecardSysfs creates a sysfs-shaped layout under root mimicking sys/bus/pci/devices/<bdf>
gnss/detect/detect_test.go:69
↓ 5 callers
Function
marshalUint16s
marshalUint16s encodes a sequence of 16-bit integers in network byte order.
ntp/ntske/records.go:218
↓ 5 callers
Function
newSendWorker
(i int, c *Config, st stats.Stats)
ptp/ptp4u/server/worker.go:49
↓ 5 callers
Function
newSlidingWindow
(size int)
ptp/sptp/client/window.go:32
↓ 5 callers
Function
parseBannerLine
parseBannerLine returns a populated StatusInfo if line matches the cfgtool receiver-detection banner, or (nil, false) otherwise.
gnss/ubx/ubx.go:245
↓ 5 callers
Function
parseResponse
(response string)
calnex/api/api.go:510
↓ 5 callers
Function
ptpingOutput
(count int, server string, totalRTT time.Duration, ts timestamps)
cmd/ptpcheck/cmd/ptping.go:151
↓ 5 callers
Function
putCRC
putCRC computes the CRC-24Q over all but the last three bytes of frame and writes the checksum into them.
rtcm/rtcm.go:158
↓ 5 callers
Function
refID
refID converts ip into ReFID format and prints it on stdout
cmd/ntpcheck/cmd/utils.go:43
↓ 5 callers
Method
reset
()
ptp/sptp/client/backoff.go:45
↓ 5 callers
Method
resyncInterval
()
servo/pi.go:267
↓ 5 callers
Function
simplifyIPv6
(ipStr string)
ptp/linearizability/linearizability_ptp.go:531
↓ 5 callers
Function
socketControlMessageTimestamp
socketControlMessageTimestamp is a very optimised version of ParseSocketControlMessage https://github.com/golang/go/blob/2ebe77a2fda1ee9ff6fd9a3e08933
timestamp/timestamp_linux.go:268
↓ 5 callers
Method
sourceHandshake
sourceHandshake sends the NTRIP v1 SOURCE request and streams raw RTCM data after the headers. The request uses a bare mountpoint (no leading slash) p
ntrip/client.go:314
↓ 5 callers
Function
stripZeroes
(num float64)
cmd/ntpcheck/cmd/utils.go:90
↓ 5 callers
Method
takeM
(n int)
fbclock/daemon/state.go:125
↓ 5 callers
Method
toMap
toMap converts struct to a map
ntp/responder/stats/json.go:48
↓ 5 callers
Function
unmarshalHeader
bytes unmarshalHeader is not a Header.UnmarshalBinary to prevent all packets from having default (and incomplete) UnmarshalBinary implementation throu
ptp/protocol/protocol.go:94
↓ 4 callers
Function
AddrToSockaddr
AddrToSockaddr converts netip.Addr + port into a socket address
timestamp/timestamp.go:200
↓ 4 callers
Method
CalnexName
CalnexName returns Calnex Name like "PTP slave" or "NTP client"
calnex/api/api.go:470
↓ 4 callers
Function
ChannelFromInt
ChannelFromInt returns channel from int
calnex/api/api.go:336
↓ 4 callers
Function
ChannelFromString
ChannelFromString returns channel from string
calnex/api/api.go:345
↓ 4 callers
Function
ClockGettime
(c int32, t *Timespec)
phc/unix/types.go:140
↓ 4 callers
Method
Communicate
(packet *control.NTPControlMsgHead)
cmd/ntpcheck/checker/ntpd.go:31
↓ 4 callers
Method
Connect
Connect establishes a connection to the NTRIP caster. If a proxy is configured, it first establishes an HTTP CONNECT tunnel through the proxy with TLS
ntrip/client.go:123
↓ 4 callers
Method
Delta
Delta is a difference between receiver's RX timestamp and our TX timestamp
ptp/linearizability/linearizability_ptp.go:174
↓ 4 callers
Method
Drain
Drain consumes pending bytes on the port without blocking, then restores the normal read timeout. Call before Cmd / Get to clear stale or asynchronous
sa53/protocol/protocol.go:123
↓ 4 callers
Method
Drain
Drain traffic
ptp/ptp4u/server/server.go:497
↓ 4 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
phc/pps_mock_test.go:139
↓ 4 callers
Function
EnableSWTimestamps
EnableSWTimestamps enables SW timestamps (TX and RX) on the socket
timestamp/timestamp_linux.go:161
↓ 4 callers
Method
FetchChannelProbe
FetchChannelProbe returns monitored protocol of the channel
calnex/api/api.go:631
↓ 4 callers
Method
FetchChannelTarget
FetchChannelTarget returns the measure target of the server monitored on the channel
calnex/api/api.go:662
↓ 4 callers
Function
FetchCounters
FetchCounters returns counters map fetched from the url
ptp/sptp/stats/stats.go:138
↓ 4 callers
Function
FloatAsUint32
nolint:revive // underscore in name mirrors the mathematical notation 2^16 FloatAsUint32 stores float as multiplier of 2**16
fbclock/types.go:97
↓ 4 callers
Function
FrequencyPPB
FrequencyPPB reads device frequency in PPB
clock/clock.go:59
↓ 4 callers
Method
Get
Get queries a single named parameter via "{get,<param>}" and returns the parsed value. Device errors ("[!N]") are surfaced as errors wrapping ErrDevic
sa53/protocol/protocol.go:177
↓ 4 callers
Method
GetMode
GetMode gets int mode from Version+Mode 8bit word
ntp/control/packet.go:307
↓ 4 callers
Method
GetPeerStatus
GetPeerStatus returns parsed PeerStatusWord struct if present
ntp/control/packet.go:340
↓ 4 callers
Method
GetVersion
GetVersion gets int version from Version+Mode 8bit word
ntp/control/packet.go:302
↓ 4 callers
Method
Good
()
ptp/linearizability/linearizability.go:29
↓ 4 callers
Method
Good
Good check if the test passed
ptp/linearizability/linearizability_ptp.go:179
↓ 4 callers
Method
Holders
Holders returns the PIDs of processes whose open file descriptors point at device. Both the literal path and any symlink target are matched. Per-pid r
sa53/preflight/preflight.go:47
↓ 4 callers
Method
IfaceHasIP
IfaceHasIP checks if selected IP is on interface
ptp/ptp4u/server/config.go:128
↓ 4 callers
Method
IncRXSignalingCancel
IncRXSignalingCancel atomically add 1 to the counter
ptp/ptp4u/stats/json.go:121
↓ 4 callers
Method
IncSequenceID
IncSequenceID adds 1 to a sequence id
ptp/ptp4u/server/subscription.go:195
↓ 4 callers
Method
IncTXTSMissing
IncTXTSMissing atomically increments the counter when all retries to get latest TX timestamp exceeded
ptp/ptp4u/stats/stats.go:103
↓ 4 callers
Method
IncTXTSMissing
IncTXTSMissing atomically increments the counter when all retries to get latest TX timestamp exceeded
ptp/ptp4u/stats/json.go:200
↓ 4 callers
Function
IoctlGetEthtoolTsInfo
IoctlGetEthtoolTsInfo is not supported on non-linux.
phc/unix/notlinux.go:92
↓ 4 callers
Method
IsResponse
IsResponse returns true if packet is a response
ntp/control/packet.go:312
↓ 4 callers
Function
LeapFile
LeapFile returns the current default leap second file path
leapsectz/leapsectz.go:34
↓ 4 callers
Method
MarshalBinaryTo
([]byte)
ptp/protocol/protocol.go:504
↓ 4 callers
Method
Name
Name returns the name of the check
calnex/verify/checks/psu.go:33
↓ 4 callers
Function
NewActivityPacket
NewActivityPacket creates new packet to request 'activity' information
ntp/chrony/packet.go:1097
↓ 4 callers
Function
NewClientAccessesByIndexPacket
NewClientAccessesByIndexPacket creates new packet to request 'clients' information: a page of up to MaxClientAccessesByIndex per-client entries starti
ntp/chrony/packet.go:1135
↓ 4 callers
Function
NewEndOfMessage
--- Constructor helpers, one per record type --- Critical-bit defaults follow the spec for a client building a request: types 0-3 MUST set it; types 4
ntp/ntske/records.go:169
↓ 4 callers
Function
NewJSONStats
NewJSONStats returns a new JSONStats
fbclock/stats/json_stats.go:33
↓ 4 callers
Function
NewLoggingPort
NewLoggingPort returns a SerialReadWriter that tees TX and RX bytes into l. l must not be nil; callers that don't want logging should not wrap.
sa53/rawlog/rawlog.go:83
↓ 4 callers
Function
NewNTPPeerStats
NewNTPPeerStats constructs NTPStats from NTPCheckResult
cmd/ntpcheck/checker/peerstats.go:27
↓ 4 callers
Function
NewRingBuffer
NewRingBuffer creates new RingBuffer of a defined size
ptp/c4u/clock/clock.go:53
↓ 4 callers
Function
NewSPTPHTTPTester
NewSPTPHTTPTester initializes a Tester
ptp/linearizability/linearizability_sptp_http.go:98
↓ 4 callers
Function
NewSelectDataPacket
NewSelectDataPacket creates new packet to request 'selectdata' information
ntp/chrony/packet.go:1109
↓ 4 callers
Function
NewUDPConnTS
NewUDPConnTS initialises a new struct UDPConnTS
ptp/sptp/client/connection.go:93
↓ 4 callers
Function
ParseAuthenticatorBody
ParseAuthenticatorBody decodes the body of an NTS Authenticator EF. Trailing bytes past the declared nonce + ciphertext are silently accepted: RFC 89
ntp/protocol/nts/authenticator.go:122
↓ 4 callers
Function
ParseValue
ParseValue extracts the value from a "[=value]" response. "[!N]" replies are surfaced as errors wrapping ErrDeviceError with the numeric code.
sa53/protocol/protocol.go:190
↓ 4 callers
Method
Preflight
Preflight refuses to proceed if another process is holding the device. A scan failure is fatal: returning the error lets the caller bail rather than c
sa53/preflight/preflight.go:97
↓ 4 callers
Method
Prepare
Prepare will prepare all math expressions
fbclock/daemon/math.go:75
↓ 4 callers
Function
PrepareConfig
PrepareConfig prepares final version of config based on defaults, CLI flags and on-disk config, and validates resulting config
ptp/sptp/client/config.go:258
↓ 4 callers
Function
ReadConfig
ReadConfig reads config from the file
ptp/sptp/client/config.go:232
↓ 4 callers
Function
ReadConfig
ReadConfig reads config and unmarshals it from yaml into Config
fbclock/daemon/config.go:117
↓ 4 callers
Function
ReadFlashStatusWord
ReadFlashStatusWord returns list of flashers (as strings) decoded from flash status word
ntp/control/packet.go:143
↓ 4 callers
Method
ReadPacketBuf
(buf []byte)
ptp/sptp/client/connection.go:36
↓ 4 callers
Function
ReadPacketWithRXTimestampBuf
ReadPacketWithRXTimestampBuf writes byte packet into provide buffer buf, and returns number of bytes copied to the buffer, client ip and HW RX timesta
timestamp/timestamp.go:154
↓ 4 callers
Function
ReadPeerStatusWord
ReadPeerStatusWord transforms PeerStatus 16bit word into usable struct
ntp/control/packet.go:267
↓ 4 callers
Function
ReadStatus
ReadStatus talks to oscillatord via monitoring port connection and reads reported Status
oscillatord/monitoring.go:274
↓ 4 callers
Function
Run
Run config generation once
ptp/c4u/c4u.go:99
↓ 4 callers
Function
Run
Run the utcoffset calculation
ptp/c4u/utcoffset/utcoffset.go:26
↓ 4 callers
Method
Run
Run executes the check
calnex/verify/checks/psu.go:38
↓ 4 callers
Function
RunCheck
RunCheck is a simple wrapper to connect to address and run NTPCheck.Run()
cmd/ntpcheck/checker/runner.go:93
↓ 4 callers
Method
RunListener
RunListener starts a listener, must be run before any client-server interactions happen
ptp/sptp/client/sptp.go:298
↓ 4 callers
Method
RunOnce
RunOnce produces one client-server exchange
ptp/sptp/client/client.go:236
↓ 4 callers
Function
SeqIDSocketControlMessage
SeqIDSocketControlMessage encodes the SequenceID into a socket control message and specifies SCM_TS_OPT_ID as the Control Message Header type
timestamp/timestamp_linux.go:225
↓ 4 callers
Method
SetClockAccuracy
SetClockAccuracy atomically sets the clock accuracy
ptp/c4u/stats/json.go:120
↓ 4 callers
Method
SetClockClass
SetClockClass atomically sets the clock class
ptp/c4u/stats/json.go:125
↓ 4 callers
Method
SetConnected
SetConnected sets connection status (1=connected, 0=disconnected).
cmd/ntripper/stats/json.go:89
↓ 4 callers
Method
SetDomainNumber
(domainNumber uint8)
ptp/protocol/protocol.go:120
↓ 4 callers
Method
SetMaxFreq
SetMaxFreq is to adjust frequency range supported by PHC
servo/pi.go:128
↓ 4 callers
Method
SetMaxTXTSAttempts
SetMaxTXTSAttempts atomically sets number of retries for get latest TX timestamp
ptp/ptp4u/stats/stats.go:100
↓ 4 callers
Method
Start
Start runs http server and initializes maps
ptp/ptp4u/stats/json.go:47
↓ 4 callers
Method
String
String returns joined list of checks
ntp/responder/server/config.go:61
↓ 4 callers
Function
Time
Time returns time we got from network card
phc/phc.go:72
↓ 4 callers
Function
TimeAndOffsetFromDevice
TimeAndOffsetFromDevice returns time we got from phc device + offset
phc/offset.go:105
← previous
next →
401–500 of 3,016, ranked by callers