]> Cypherpunks repositories - gostls13.git/commitdiff
exvar: new Timer var type.
authorDavid Symonds <dsymonds@golang.org>
Thu, 16 Jul 2009 06:24:27 +0000 (23:24 -0700)
committerDavid Symonds <dsymonds@golang.org>
Thu, 16 Jul 2009 06:24:27 +0000 (23:24 -0700)
R=rsc
APPROVED=r
DELTA=146  (142 added, 0 deleted, 4 changed)
OCL=31654
CL=31716

src/pkg/Make.deps
src/pkg/exvar/exvar.go

index b58d2cc5f63c36893e73c5962d0914d4f30885d3..1241bb479787c55d0f1705bd858c8589d017630a 100644 (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
index 6275e2d258500461af8f5d817229e39e3dbbea42..7849714978945a55d3afa5b0cea41586e06069eb 100644 (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 {