MCPcopy Create free account
hub / github.com/prometheus/common / UnixNano

Method UnixNano

model/time.go:107–109  ·  view source on GitHub ↗

UnixNano returns t as a Unix time, the number of nanoseconds elapsed since January 1, 1970 UTC.

()

Source from the content-addressed store, hash-verified

105// UnixNano returns t as a Unix time, the number of nanoseconds elapsed
106// since January 1, 1970 UTC.
107func (t Time) UnixNano() int64 {
108 return int64(t) * nanosPerTick
109}
110
111// The number of digits after the dot.
112var dotPrecision = int(math.Log10(float64(second)))

Callers 3

NowFunction · 0.80
TestTimeConversionsFunction · 0.80
writeExemplarFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestTimeConversionsFunction · 0.64