diff options
author | Tamir Duberstein <tamird@google.com> | 2021-10-07 14:02:20 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-07 14:04:55 -0700 |
commit | a7045f051f7bcdca079cdb0636f728a18b609121 (patch) | |
tree | 31150f22f45853b4b3be2e782a32a32e5017a012 /pkg/tcpip/transport/icmp | |
parent | d93c3c2eff5e4c92d7740d82ff079a0ae51f60d9 (diff) |
Store timestamps as time.Time
Rather than boiling down to an integer eagerly, do it as late as possible.
PiperOrigin-RevId: 401599308
Diffstat (limited to 'pkg/tcpip/transport/icmp')
-rw-r--r-- | pkg/tcpip/transport/icmp/endpoint.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/icmp/endpoint.go b/pkg/tcpip/transport/icmp/endpoint.go index bb0db9f70..31579a896 100644 --- a/pkg/tcpip/transport/icmp/endpoint.go +++ b/pkg/tcpip/transport/icmp/endpoint.go @@ -180,7 +180,7 @@ func (e *endpoint) Read(dst io.Writer, opts tcpip.ReadOptions) (tcpip.ReadResult Total: p.data.Size(), ControlMessages: tcpip.ControlMessages{ HasTimestamp: true, - Timestamp: p.receivedAt.UnixNano(), + Timestamp: p.receivedAt, }, } if opts.NeedRemoteAddr { |