diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2012-01-18 16:49:59 -0800 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2012-01-18 16:49:59 -0800 |
commit | 98af38807e9bc240b83d1a0aa6985a2b4a9f9778 (patch) | |
tree | 1d4b47b543fbbb6cdb8ddaa5e03636c7579d914a | |
parent | 7cb21a79a40250bb989a2dc086ae30a60783afdd (diff) | |
download | go-98af38807e9bc240b83d1a0aa6985a2b4a9f9778.tar.gz go-98af38807e9bc240b83d1a0aa6985a2b4a9f9778.zip |
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
-rw-r--r-- | src/pkg/net/fd_windows.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/net/fd_windows.go b/src/pkg/net/fd_windows.go index 9e799bde9f..637510b732 100644 --- a/src/pkg/net/fd_windows.go +++ b/src/pkg/net/fd_windows.go @@ -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 |