MCPcopy
hub / github.com/oklog/ulid / Time

Function Time

ulid.go:452–456  ·  view source on GitHub ↗

Time converts Unix milliseconds in the format returned by the Timestamp function to a time.Time.

(ms uint64)

Source from the content-addressed store, hash-verified

450// Time converts Unix milliseconds in the format
451// returned by the Timestamp function to a time.Time.
452func Time(ms uint64) time.Time {
453 s := int64(ms / 1e3)
454 ns := int64((ms % 1e3) * 1e6)
455 return time.Unix(s, ns)
456}
457
458// SetTime sets the time component of the ULID to the given Unix time
459// in milliseconds.

Callers 1

TimestampMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…