summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/icmp
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-10-07 14:02:20 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-07 14:04:55 -0700
commita7045f051f7bcdca079cdb0636f728a18b609121 (patch)
tree31150f22f45853b4b3be2e782a32a32e5017a012 /pkg/tcpip/transport/icmp
parentd93c3c2eff5e4c92d7740d82ff079a0ae51f60d9 (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.go2
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 {