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
↓ 249 callers
Method
Close
()
ptp/sptp/client/connection.go:37
↓ 233 callers
Method
Unix
Unix returns true if connected via a unix socket
cmd/ntpcheck/checker/chrony.go:202
↓ 166 callers
Method
Duration
Duration converts PTP CorrectionField to time.Duration, ignoring case where correction is too big, and dropping fractions of nanoseconds
ptp/protocol/types.go:170
↓ 141 callers
Method
Size
Size returns the size of the firmware file
sa53/firmware/firmware.go:60
↓ 123 callers
Method
Printf
(format string, v ...any)
ntp/chrony/logger.go:21
↓ 113 callers
Method
Error
Error implements the error interface
phc/adjtime.go:34
↓ 108 callers
Method
Name
()
calnex/verify/checks/check.go:23
↓ 91 callers
Method
Read
(buf []byte)
phc/pps_source.go:87
↓ 90 callers
Method
Run
(name string, insecureTLS bool)
calnex/verify/checks/check.go:24
↓ 83 callers
Method
Sample
Sample function to calculate frequency based on the offset
servo/pi.go:176
↓ 75 callers
Method
Len
()
ptp/sptp/stats/stats.go:62
↓ 74 callers
Method
Unlock
()
phc/pps_source.go:71
↓ 69 callers
Method
Error
()
cmd/ntripper/main.go:273
↓ 68 callers
Method
Bytes
Bytes returns the written data, trimmed to the byte boundary.
rtcm/bits.go:104
↓ 68 callers
Method
IsSpike
IsSpike function to check if offset is considered as spike
servo/pi.go:151
↓ 68 callers
Method
String
()
ptp/protocol/types.go:119
↓ 60 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
ptp/sptp/client/stats_mock_test.go:50
↓ 60 callers
Method
Error
()
ptp/protocol/management.go:282
↓ 58 callers
Method
Nanoseconds
Nanoseconds decodes Correction to human-understandable nanoseconds
ptp/protocol/types.go:161
↓ 56 callers
Function
NewSdoIDAndMsgType
NewSdoIDAndMsgType builds new SdoIDAndMsgType from MessageType and flags
ptp/protocol/types.go:75
↓ 55 callers
Method
load
load gets the value by the key
ptp/ptp4u/stats/stats.go:179
↓ 51 callers
Method
Sub
Sub returns the estimated difference between two PHC SYS_OFFSET_PRECISE readings
phc/offset.go:160
↓ 49 callers
Method
Get
Get returns an map of counters
fbclock/stats/stats.go:61
↓ 49 callers
Function
NewAPI
NewAPI returns an pointer of API struct with default values.
calnex/api/api.go:573
↓ 45 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
phc/pps_mock_test.go:290
↓ 45 callers
Method
Time
()
phc/pps_source.go:81
↓ 44 callers
Method
String
String implements fmt.Stringer interface
cmd/ptpcheck/cmd/nic.go:107
↓ 44 callers
Method
ToFloat
ToFloat does magic to decode float from int32. Code is copied and translated to Go from original C sources.
ntp/chrony/helpers.go:119
↓ 43 callers
Method
WriteBits
WriteBits writes n bits (1-32) from the least significant bits of val.
rtcm/bits.go:78
↓ 39 callers
Method
CalnexAPI
CalnexAPI returns probe name (lower case)
calnex/api/api.go:460
↓ 39 callers
Method
Write
(p []byte)
ptp/protocol/management_test.go:201
↓ 38 callers
Method
ReadBits
ReadBits reads n bits (1-32) as an unsigned value.
rtcm/bits.go:31
↓ 37 callers
Function
Bytes
Bytes converts any packet to []bytes
ptp/protocol/protocol.go:520
↓ 37 callers
Method
set
set modifies a single config value
calnex/config/config.go:69
↓ 34 callers
Function
IPToSockaddr
IPToSockaddr converts IP + port into a socket address Somewhat copy from https://github.com/golang/go/blob/16cd770e0668a410a511680b2ac1412e554bd27b/sr
timestamp/timestamp.go:188
↓ 33 callers
Method
SetCounter
(key string, val int64)
fbclock/stats/stats.go:30
↓ 32 callers
Function
NewJSONStats
NewJSONStats returns a new JSONStats
ptp/ptp4u/stats/json.go:37
↓ 32 callers
Method
Write
Write sends raw RTCM data to the caster. In NTRIP v2 chunked mode each call is wrapped in a single HTTP chunk. The dump (if any) always receives the r
ntrip/client.go:202
↓ 31 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
ptp/sptp/client/servo_mock_test.go:49
↓ 30 callers
Method
Err
()
ptp/linearizability/linearizability.go:31
↓ 29 callers
Function
FromBytes
FromBytes parses []byte into any packet
ptp/protocol/protocol.go:536
↓ 29 callers
Method
SetMinMaxCF
SetMinMaxCF atomically sets max CF value observed (assuming all CF values are positive) or min CF (if any CF values are negative) CF values may be neg
ptp/ptp4u/stats/json.go:207
↓ 29 callers
Method
active
()
ptp/sptp/client/backoff.go:41
↓ 28 callers
Method
Marshal
Marshal encodes a single record into its wire format (RFC 8915 §4).
ntp/ntske/records.go:81
↓ 28 callers
Function
NewSubscriptionClient
NewSubscriptionClient gets minimal required arguments to create a subscription
ptp/ptp4u/server/subscription.go:65
↓ 27 callers
Method
Empty
Empty timestamp
ptp/protocol/types.go:349
↓ 26 callers
Method
File
()
phc/pps_source.go:84
↓ 26 callers
Function
IPToBytes
IPToBytes converts a net.IP to a [16]uint8 array for use in IPAddr structs. For IPv4, it stores the 4 bytes at the beginning of the array. For IPv6, i
ntp/chrony/helpers.go:224
↓ 25 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
ptp/sptp/client/udpconn_mock_test.go:124
↓ 25 callers
Method
Seconds
Seconds returns number of seconds as uint64
ptp/protocol/types.go:290
↓ 24 callers
Method
WriteToWithTS
(b []byte, addr net.Addr)
ptp/linearizability/linearizability_ptp.go:49
↓ 23 callers
Method
Communicate
Communicate sends the packet to chronyd, parse response into something usable
ntp/chrony/client.go:36
↓ 23 callers
Method
WriteSignedBits
WriteSignedBits writes n bits of a signed value in two's complement.
rtcm/bits.go:93
↓ 22 callers
Function
ConnFd
ConnFd returns file descriptor of a connection
timestamp/timestamp.go:124
↓ 22 callers
Method
ReadSignedBits
ReadSignedBits reads n bits as a signed two's complement value.
rtcm/bits.go:47
↓ 21 callers
Method
MeanFreq
MeanFreq to return best calculated frequency from filter
servo/pi.go:442
↓ 21 callers
Function
NewMockUDPConnWithTS
NewMockUDPConnWithTS creates a new mock instance.
ptp/sptp/client/udpconn_mock_test.go:117
↓ 21 callers
Method
Open
Open verifies and decrypts ciphertext against ad and nonce. A nonce whose length is wrong for the algorithm is rejected with ErrAEADNonceSize; any aut
ntp/protocol/nts/aead.go:41
↓ 21 callers
Method
store
store saves the value with the key
ptp/ptp4u/stats/stats.go:209
↓ 20 callers
Method
Announce
Announce returns ptp Announce packet
ptp/ptp4u/server/subscription.go:327
↓ 20 callers
Function
DecodePacket
DecodePacket provides single entry point to try and decode any []bytes to PTPv2 packet. It can be used for easy integration with anything that provide
ptp/protocol/protocol.go:548
↓ 20 callers
Function
NewStats
NewStats created new instance of Stats
fbclock/stats/stats.go:40
↓ 20 callers
Method
Type
()
ptp/protocol/tlvs.go:27
↓ 19 callers
Function
DefaultConfig
DefaultConfig returns Config initialized with default values
ptp/sptp/client/config.go:142
↓ 19 callers
Method
MessageType
()
ptp/protocol/protocol.go:498
↓ 19 callers
Method
Run
()
cmd/ntpcheck/checker/runner.go:32
↓ 19 callers
Method
Scan
Scan reads the next RTCM3 frame from the stream. It returns true if a frame was successfully read, or false on error or EOF. After Scan returns false,
rtcm/scanner.go:59
↓ 19 callers
Method
String
String timestamp to string
timestamp/timestamp.go:79
↓ 19 callers
Function
newDaemonState
(ringSize int)
fbclock/daemon/state.go:40
↓ 18 callers
Function
ClockAccuracyFromOffset
ClockAccuracyFromOffset returns PTP Clock Accuracy covering the time.Duration
ptp/protocol/types.go:422
↓ 18 callers
Method
Fd
()
phc/pps_source.go:88
↓ 18 callers
Method
MsgType
MsgType extracts MessageType from SdoIDAndMsgType
ptp/protocol/types.go:70
↓ 18 callers
Function
NewMockStatsServer
NewMockStatsServer creates a new mock instance.
ptp/sptp/client/stats_mock_test.go:43
↓ 18 callers
Method
SetGMStats
(stat *gmstats.Stat)
ptp/sptp/client/stats.go:43
↓ 18 callers
Function
decodePacket
decodePacket decodes bytes to valid response packet. an easy way to test this is to use 'testchrony' tool we have.
ntp/chrony/packet.go:1193
↓ 17 callers
Function
ConfigureVerbosity
ConfigureVerbosity configures log verbosity based on parsed flags. Needs to be called by any subcommand.
cmd/ptpcheck/cmd/root.go:46
↓ 17 callers
Method
Less
(i, j int)
ptp/sptp/stats/stats.go:63
↓ 17 callers
Method
delay
delay evaluates the latest path delay and applies filter logic It returns false if delay is bad and wasn't used
ptp/sptp/client/measurements.go:156
↓ 17 callers
Function
getbits
getbits reads n bits at bit offset pos as a two's complement signed value.
rtcm/ephemeris.go:128
↓ 17 callers
Function
getbitu
getbitu reads n bits (MSB-first) at bit offset pos as an unsigned value.
rtcm/ephemeris.go:119
↓ 16 callers
Function
ConfigureVerbosity
ConfigureVerbosity configures log verbosity based on parsed flags. Needs to be called by any subcommand.
cmd/ntpcheck/cmd/root.go:42
↓ 16 callers
Function
DefaultPiServoCfg
DefaultPiServoCfg to create default pi servo config
servo/pi.go:483
↓ 16 callers
Function
DefaultServoConfig
DefaultServoConfig generates default servo struct
servo/servo.go:59
↓ 16 callers
Function
FromFile
FromFile returns a *Device corresponding to an *os.File
phc/device.go:35
↓ 16 callers
Function
NewPiServo
NewPiServo to create servo structure
servo/pi.go:450
↓ 16 callers
Method
SetGmsAvailable
(gmsAvailable int)
ptp/sptp/client/stats.go:34
↓ 16 callers
Method
SetSequence
(uint16)
ptp/protocol/protocol.go:499
↓ 16 callers
Method
Write
Write new element to a ring buffer
ptp/c4u/clock/clock.go:58
↓ 16 callers
Method
add
(sample float64)
ptp/sptp/client/window.go:48
↓ 16 callers
Function
gpsObs
(sv uint8, pr, cp float64, dop float32, cno uint8)
rtcm/msm_encode_test.go:126
↓ 16 callers
Method
inc
()
ptp/sptp/client/backoff.go:58
↓ 15 callers
Method
AddSFRBX
AddSFRBX consumes a UBX-RXM-SFRBX payload (the UBX message payload, without the UBX header/checksum). When a payload completes GPS LNAV subframes 1-3
rtcm/ephemeris.go:56
↓ 15 callers
Function
DetectPeaks
DetectPeaks finds the 4 reflective peaks (OA, OB, OC, OD) in the OTDR trace. OA is found via local prominence detection (it is a strong reflection fr
caliper/peaks.go:92
↓ 15 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
ptp/sptp/client/clock_mock_test.go:49
↓ 15 callers
Method
SetGmsTotal
(gmsTotal int)
ptp/sptp/client/stats.go:33
↓ 15 callers
Function
buildFrame
buildFrame constructs a valid RTCM3 frame with the given payload.
rtcm/rtcm_test.go:26
↓ 15 callers
Method
pushDataPoint
(data *DataPoint)
fbclock/daemon/state.go:72
↓ 14 callers
Method
ConnFd
()
ptp/sptp/client/connection.go:45
↓ 14 callers
Method
EvalAndValidate
EvalAndValidate makes sure config is valid and evaluates expressions for further use.
fbclock/daemon/config.go:48
↓ 14 callers
Function
NewMockClock
NewMockClock creates a new mock instance.
ptp/sptp/client/clock_mock_test.go:42
next →
1–100 of 3,016, ranked by callers