summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-03 19:05:53 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-03 19:11:21 +0200
commitb4010123f74470eeca0551a151dea3e7a7381bcc (patch)
treed65f94a30c224e8c6bd11340f0a361b76112bcc3
parent1ff37e2b0706143c5da7131ae13f45d0d1882344 (diff)
tun: windows: spin for only a millisecond/80
Performance stays the same as before.
-rw-r--r--tun/tun_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 30518c6..b0faed8 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -215,7 +215,7 @@ retry:
if tun.close {
return 0, os.ErrClosed
}
- if time.Since(start) >= time.Millisecond*50 {
+ if time.Since(start) >= time.Millisecond/80 /* ~1gbit/s */ {
windows.WaitForSingleObject(tun.rings.send.tailMoved, windows.INFINITE)
goto retry
}