MCPcopy
hub / github.com/segmentio/kafka-go / timestamp

Function timestamp

time.go:21–26  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

19}
20
21func timestamp(t time.Time) int64 {
22 if t.IsZero() {
23 return 0
24 }
25 return t.UnixNano() / int64(time.Millisecond)
26}
27
28func makeDuration(ms int32) time.Duration {
29 return time.Duration(ms) * time.Millisecond

Callers 5

messageMethod · 0.70
ReadOffsetMethod · 0.70
TimeOffsetOfFunction · 0.70
writeRecordBatchMethod · 0.70
writeMessageMethod · 0.70

Calls 1

IsZeroMethod · 0.80

Tested by

no test coverage detected