Commit 98af3880 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net: use NewTimer, not NewTicker, in fd_windows.go

It works with NewTicker too, but is potentially a bit less efficient,
and reads wrong.

This is what happens when you TBR Windows changes, I guess.

R=golang-dev, gri, iant
CC=golang-dev
https://golang.org/cl/5536060
parent 7cb21a79
......@@ -179,11 +179,11 @@ func (s *ioSrv) ExecIO(oi anOpIface, deadline int64) (n int, err error) {
if dt < 1 {
dt = 1
}
ticker := time.NewTicker(time.Duration(dt) * time.Nanosecond)
defer ticker.Stop()
timer := time.NewTimer(time.Duration(dt) * time.Nanosecond)
defer timer.Stop()
select {
case r = <-o.resultc:
case <-ticker.C:
case <-timer.C:
s.canchan <- oi
<-o.errnoc
r = <-o.resultc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment