diff options
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 51360b11f..b1bd5117f 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -123,16 +123,11 @@ func (e ErrSaveRejection) Error() string { // time, but never for netstack internal timekeeping. type Clock interface { // NowNanoseconds returns the current real time as a number of - // nanoseconds since some epoch. + // nanoseconds since the Unix epoch. NowNanoseconds() int64 -} - -// StdClock implements Clock with the time package. -type StdClock struct{} -// NowNanoseconds implements Clock.NowNanoseconds. -func (*StdClock) NowNanoseconds() int64 { - return time.Now().UnixNano() + // NowMonotonic returns a monotonic time value. + NowMonotonic() int64 } // Address is a byte slice cast as a string that represents the address of a |