summaryrefslogtreecommitdiff
path: root/libgo/go/time/sys.go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-12 23:40:51 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-12 23:40:51 +0000
commit46bc1fe2f5a3c7ee4273b99d700fecf1555f64e0 (patch)
tree0c68629fac9d7c6f103b401c9063ef00ed259f06 /libgo/go/time/sys.go
parentdc15d51eb56c0efe84bf82b02ac2ba9a231ce69b (diff)
downloadgcc-46bc1fe2f5a3c7ee4273b99d700fecf1555f64e0.tar.gz
libgo: Update to weekly.2011-11-18.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/time/sys.go')
-rw-r--r--libgo/go/time/sys.go23
1 files changed, 1 insertions, 22 deletions
diff --git a/libgo/go/time/sys.go b/libgo/go/time/sys.go
index ca1d334a5b7..a5e529b814a 100644
--- a/libgo/go/time/sys.go
+++ b/libgo/go/time/sys.go
@@ -17,25 +17,4 @@ func Seconds() int64 {
func Nanoseconds() int64
// Sleep pauses the current goroutine for at least ns nanoseconds.
-// Higher resolution sleeping may be provided by syscall.Nanosleep
-// on some operating systems.
-func Sleep(ns int64) error {
- _, err := sleep(Nanoseconds(), ns)
- return err
-}
-
-// sleep takes the current time and a duration,
-// pauses for at least ns nanoseconds, and
-// returns the current time and an error.
-func sleep(t, ns int64) (int64, error) {
- // TODO(cw): use monotonic-time once it's available
- end := t + ns
- for t < end {
- err := sysSleep(end - t)
- if err != nil {
- return 0, err
- }
- t = Nanoseconds()
- }
- return t, nil
-}
+func Sleep(ns int64)