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

Method Unix

model/time.go:101–103  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

99// Unix returns t as a Unix time, the number of seconds elapsed
100// since January 1, 1970 UTC.
101func (t Time) Unix() int64 {
102 return int64(t) / second
103}
104
105// UnixNano returns t as a Unix time, the number of nanoseconds elapsed
106// since January 1, 1970 UTC.

Callers 4

TimeMethod · 0.80
TestTimeConversionsFunction · 0.80
TestDurationFunction · 0.80
TestCreateOpenMetricsFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestTimeConversionsFunction · 0.64
TestDurationFunction · 0.64
TestCreateOpenMetricsFunction · 0.64