diff options
author | Sigrid <ftrvxmtrx@gmail.com> | 2020-07-31 15:48:54 +0200 |
---|---|---|
committer | Sigrid <ftrvxmtrx@gmail.com> | 2020-07-31 15:48:54 +0200 |
commit | 853f0e33fe744d816d66276491c34f9bccd4e6e3 (patch) | |
tree | b2ef3bcf867563862f3f2d7c0821062bdddb178f /sys/src/cmd/vmx/virtio.c | |
parent | de27182a8ebe759bebfb7b123dffbb0f29eea922 (diff) |
vmx(1): use cycles() instead of nsec() when possible
this provides better timing and reduced number of syscalls (~2.7M old
vs ~35K new in a test)
Diffstat (limited to 'sys/src/cmd/vmx/virtio.c')
-rw-r--r-- | sys/src/cmd/vmx/virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/vmx/virtio.c b/sys/src/cmd/vmx/virtio.c index 4e18fa7bd..6451eeef5 100644 --- a/sys/src/cmd/vmx/virtio.c +++ b/sys/src/cmd/vmx/virtio.c @@ -518,7 +518,7 @@ vionetwproc(void *vp) if((v->net.flags & VNETHEADER) != 0){ txbuf[0] = len >> 8; txbuf[1] = len; - ns = nsec(); + ns = nanosec(); txbuf[2] = ns >> 56; txbuf[3] = ns >> 48; txbuf[4] = ns >> 40; |