1
0
mirror of https://github.com/golang/go synced 2024-11-26 13:38:20 -07:00

exvar: new Timer var type.

R=rsc
APPROVED=r
DELTA=146  (142 added, 0 deleted, 4 changed)
OCL=31654
CL=31716
This commit is contained in:
David Symonds 2009-07-15 23:24:27 -07:00
parent a9be3f46c6
commit 13960ae8ae
2 changed files with 9 additions and 1 deletions

View File

@ -41,7 +41,7 @@ path.install: strings.install
rand.install:
reflect.install: runtime.install strconv.install strings.install
regexp.install: bytes.install container/vector.install io.install os.install runtime.install utf8.install
rpc.install: bufio.install gob.install http.install io.install log.install net.install os.install reflect.install strconv.install strings.install sync.install time.install unicode.install utf8.install
rpc.install: bufio.install gob.install http.install io.install log.install net.install os.install reflect.install strconv.install strings.install sync.install unicode.install utf8.install
runtime.install:
sort.install:
strconv.install: bytes.install math.install os.install utf8.install

View File

@ -162,6 +162,14 @@ func Get(name string) Var {
return nil
}
// RemoveAll removes all exported variables.
// This is for tests; don't call this on a real server.
func RemoveAll() {
mutex.Lock();
defer mutex.Unlock();
vars = make(map[string] Var);
}
// Convenience functions for creating new exported variables.
func NewInt(name string) *Int {