Time

The Time type represents an instant in time with nanosecond precision.

The time instants can be compared using the Before, After and Equal methods.

The Sub method subtracts two instants, producing a Duration.
The Add method adds a Time and a Duration, producing a Time.

The zero value of type Time is January 1, Year 1, 00:00:00.000000000 UTC. Since this time is unlikely to happen in practice, the IsZero method provides a simple way to detect an uninitialized time. explicitly.

time.go