MCPcopy
hub / github.com/google/uuid / UnixTime

Method UnixTime

time.go:35–40  ·  view source on GitHub ↗

UnixTime converts t the number of seconds and nanoseconds using the Unix epoch of 1 Jan 1970.

()

Source from the content-addressed store, hash-verified

33// UnixTime converts t the number of seconds and nanoseconds using the Unix
34// epoch of 1 Jan 1970.
35func (t Time) UnixTime() (sec, nsec int64) {
36 sec = int64(t - g1582ns100)
37 nsec = (sec % 10000000) * 100
38 sec /= 10000000
39 return sec, nsec
40}
41
42// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and
43// clock sequence as well as adjusting the clock sequence as needed. An error

Callers 3

TestGetTimeFunction · 0.80
TestNodeAndTimeFunction · 0.80
TestNewV6WithTimeFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestGetTimeFunction · 0.64
TestNodeAndTimeFunction · 0.64
TestNewV6WithTimeFunction · 0.64