diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-05-26 13:54:18 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-26 13:54:18 +0000 |
commit | bad85153aee12855d230c26fbd38a71a6b467c61 (patch) | |
tree | 9cafad02339b61a34ff6c07ed9e9e46847ced1e9 /pkg/tcpip/tcpip.go | |
parent | 014a4bec310ce657c40a620cdcedb7c868a34631 (diff) | |
parent | fcad6f91a3f292b6b76be10f03baf05ee5245d3d (diff) |
Merge release-20210518.0-45-gfcad6f91a (automated)
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index ca98da847..91622fa4c 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -76,6 +76,11 @@ func (mt MonotonicTime) Before(u MonotonicTime) bool { return mt.nanoseconds < u.nanoseconds } +// After reports whether the monotonic clock reading mt is after u. +func (mt MonotonicTime) After(u MonotonicTime) bool { + return mt.nanoseconds > u.nanoseconds +} + // Add returns the monotonic clock reading mt+d. func (mt MonotonicTime) Add(d time.Duration) MonotonicTime { return MonotonicTime{ |