The Go programming language
Go to file
Russ Cox 3b860269ee runtime: add timer support, use for package time
This looks like it is just moving some code from
time to runtime (and translating it to C), but the
runtime can do a better job managing the goroutines,
and it needs this functionality for its own maintenance
(for example, for the garbage collector to hand back
unused memory to the OS on a time delay).
Might as well have just one copy of the timer logic,
and runtime can't depend on time, so vice versa.

It also unifies Sleep, NewTicker, and NewTimer behind
one mechanism, so that there are no claims that one
is more efficient than another.  (For example, today
people recommend using time.After instead of time.Sleep
to avoid blocking an OS thread.)

Fixes #1644.
Fixes #1731.
Fixes #2190.

R=golang-dev, r, hectorchu, iant, iant, jsing, alex.brainman, dvyukov
CC=golang-dev
https://golang.org/cl/5334051
2011-11-09 15:17:05 -05:00
doc doc: htmlescape weekly notes 2011-11-09 13:52:02 -05:00
include lib9: add ctime 2011-11-07 13:15:16 -05:00
lib codereview: show LGTMs in hg p 2011-10-19 15:08:33 -04:00
misc cgo: fix g0 stack guard 2011-11-09 23:11:48 +03:00
src runtime: add timer support, use for package time 2011-11-09 15:17:05 -05:00
test gc: better error for non-calling use of unsafe builtins. 2011-11-09 18:30:54 +01:00
.hgignore .hgignore: ignore src/pkg/exp/ebnflint/ebnflint 2011-10-26 22:22:33 +11:00
.hgtags fix .hgtags 2011-11-09 11:22:25 +11:00
AUTHORS A+C: Alexander Reece (individual CLA) 2011-10-31 13:59:04 -04:00
CONTRIBUTORS CONTRIBUTORS: add David Crawshaw's codereview account 2011-11-07 11:18:38 -05:00
favicon.ico add a favicon plus a couple of hi-res versions of gordon 2009-10-26 10:13:07 -07:00
LICENSE LICENSE: separate, change PATENTS text 2010-12-06 16:31:59 -05:00
PATENTS LICENSE: separate, change PATENTS text 2010-12-06 16:31:59 -05:00
README build: update, streamline documentation for new $GOBIN 2010-08-24 20:00:50 -04:00
robots.txt godoc: serve robots.txt raw 2011-02-19 05:46:20 +11:00

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install.html in your web browser.

After installing Go, you can view a nicely formatted
doc/install.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install.html.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

--

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README).  You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:

    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin

See doc/install.html for more details.