diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-02-24 01:39:05 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-02-24 01:39:05 +0800 |
commit | 114c3b4efe7f30ab7be0bec013210e7b4c3d08d7 (patch) | |
tree | 5230f6fee87dcbac36e1d71d6ab731b55eab8268 /ethutil/common.go | |
parent | b9894c1d0979b9f3e8428b1dc230f1ece106f676 (diff) | |
parent | dd086791acf477da7641c168f82de70ed0b2dca6 (diff) | |
download | go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.gz go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.bz2 go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.lz go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.xz go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.zst go-tangerine-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.zip |
Merge remote-tracking branch 'upstream/develop' into evmjit
Diffstat (limited to 'ethutil/common.go')
-rw-r--r-- | ethutil/common.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go index 271c56fd5..2ef2440c7 100644 --- a/ethutil/common.go +++ b/ethutil/common.go @@ -4,6 +4,7 @@ import ( "fmt" "math/big" "runtime" + "time" ) func IsWindows() bool { @@ -86,3 +87,9 @@ var ( Big256 = big.NewInt(0xff) Big257 = big.NewInt(257) ) + +func Bench(pre string, cb func()) { + start := time.Now() + cb() + fmt.Println(pre, ": took:", time.Since(start)) +} |