diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-05-03 16:44:02 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-03 16:45:48 -0700 |
commit | 279f9fcee763a52d210f8269bc4c871b7eee112f (patch) | |
tree | af2d397dce721ead0d80efd8a768e84e3f8e38ff /pkg/tcpip/tcpip.go | |
parent | f0b3298db07df63fa74559d5689008f9de9980a9 (diff) |
Implement standard clock safely
Previously, tcpip.StdClock depended on linking with the unexposed method
time.now to implement tcpip.Clock using the time package. This change
updates the standard clock to not require manually linking to this
unexported method and use publicly documented functions from the time
package.
PiperOrigin-RevId: 371805101
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 2e426ffe7..d8a10065d 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -73,7 +73,7 @@ type Clock interface { // nanoseconds since the Unix epoch. NowNanoseconds() int64 - // NowMonotonic returns a monotonic time value. + // NowMonotonic returns a monotonic time value at nanosecond resolution. NowMonotonic() int64 // AfterFunc waits for the duration to elapse and then calls f in its own |