~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/time/sys.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
package time
6
6
 
7
 
import (
8
 
        "os"
9
 
        "syscall"
10
 
)
 
7
import "os"
11
8
 
12
9
// Seconds reports the number of seconds since the Unix epoch,
13
10
// January 1, 1970 00:00:00 UTC.
52
49
        }
53
50
        return t, nil
54
51
}
55
 
 
56
 
func sysSleep(t int64) os.Error {
57
 
        errno := syscall.Sleep(t)
58
 
        if errno != 0 && errno != syscall.EINTR {
59
 
                return os.NewSyscallError("sleep", errno)
60
 
        }
61
 
        return nil
62
 
}