MCPcopy Create free account
hub / github.com/facebook/time / GetMode

Method GetMode

ntp/control/packet.go:307–309  ·  view source on GitHub ↗

GetMode gets int mode from Version+Mode 8bit word

()

Source from the content-addressed store, hash-verified

305
306// GetMode gets int mode from Version+Mode 8bit word
307func (n NTPControlMsgHead) GetMode() int {
308 return int(n.VnMode & 0x7) // get last 3 bits
309}
310
311// IsResponse returns true if packet is a response
312func (n NTPControlMsgHead) IsResponse() bool {

Callers 3

TestMakeVnModeFunction · 0.95
RunMethod · 0.80
ServerStatsMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestMakeVnModeFunction · 0.76