diff options
Diffstat (limited to 'libgo/go/net/tcpsock.go')
-rw-r--r-- | libgo/go/net/tcpsock.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libgo/go/net/tcpsock.go b/libgo/go/net/tcpsock.go index 0daa2f6..9a9b03a 100644 --- a/libgo/go/net/tcpsock.go +++ b/libgo/go/net/tcpsock.go @@ -12,7 +12,7 @@ import ( "time" ) -// BUG(mikio): On JS, NaCl and Windows, the File method of TCPConn and +// BUG(mikio): On JS and Windows, the File method of TCPConn and // TCPListener is not implemented. // TCPAddr represents the address of a TCP end point. @@ -337,3 +337,8 @@ func ListenTCP(network string, laddr *TCPAddr) (*TCPListener, error) { } return ln, nil } + +// roundDurationUp rounds d to the next multiple of to. +func roundDurationUp(d time.Duration, to time.Duration) time.Duration { + return (d + to - 1) / to +} |