summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShenghou Ma <minux.ma@gmail.com>2014-01-09 15:21:24 -0500
committerShenghou Ma <minux.ma@gmail.com>2014-01-09 15:21:24 -0500
commit0e5bc85ab088e2a483c4a5b1107ced9b1f97ef66 (patch)
tree490080ba713244905a81c8a447358bc0e7dd7ba3
parent53036ccba7266b919f2fd7bc78f2b6f371e3dbec (diff)
downloadgo-0e5bc85ab088e2a483c4a5b1107ced9b1f97ef66.tar.gz
testing: document that ResetTimer also zeros the allocation counters.
Fixes issue 6998. R=golang-codereviews, gobot, r CC=golang-codereviews https://codereview.appspot.com/44880044
-rw-r--r--src/pkg/testing/benchmark.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/testing/benchmark.go b/src/pkg/testing/benchmark.go
index 3473c5b2c..cff077417 100644
--- a/src/pkg/testing/benchmark.go
+++ b/src/pkg/testing/benchmark.go
@@ -74,7 +74,7 @@ func (b *B) StopTimer() {
}
}
-// ResetTimer sets the elapsed benchmark time to zero.
+// ResetTimer zeros the elapsed benchmark time and memory allocation counters.
// It does not affect whether the timer is running.
func (b *B) ResetTimer() {
if b.timerOn {