MCPcopy
hub / github.com/uber-go/zap / NanosDurationEncoder

Function NanosDurationEncoder

zapcore/encoder.go:240–242  ·  view source on GitHub ↗

NanosDurationEncoder serializes a time.Duration to an integer number of nanoseconds elapsed.

(d time.Duration, enc PrimitiveArrayEncoder)

Source from the content-addressed store, hash-verified

238// NanosDurationEncoder serializes a time.Duration to an integer number of
239// nanoseconds elapsed.
240func NanosDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
241 enc.AppendInt64(int64(d))
242}
243
244// MillisDurationEncoder serializes a time.Duration to an integer number of
245// milliseconds elapsed.

Callers

nothing calls this directly

Calls 1

AppendInt64Method · 0.65

Tested by

no test coverage detected