]> Cypherpunks repositories - gostls13.git/commit
time: add Now()/UnixNano() malloc tests
authorDave Cheney <dave@cheney.net>
Sun, 25 Nov 2012 00:29:06 +0000 (11:29 +1100)
committerDave Cheney <dave@cheney.net>
Sun, 25 Nov 2012 00:29:06 +0000 (11:29 +1100)
commit1e9ab9e7926ec655850379b0326b11f830a482e7
tree9491184d10fa43c2c3d69b9be188b8f7db8c8916
parent747dda9767d3da479900ad180b11a73f78f0412e
time: add Now()/UnixNano() malloc tests

The fix for issue 4403 may include more calls to time.Now().UnixNano(). I was concerned that if this function allocated it would cause additional garbage on the heap. It turns out that it doesn't, which is a nice surprise.

Also add benchmark for Now().UnixNano()

R=bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/6849097
src/pkg/time/time_test.go