Permalink
Browse files

blocks-benchmark rb

  • Loading branch information...
1 parent cf8ff0a commit 9481316ec0e17ea5b82a89339550dae296eec72b @mpapis committed Oct 19, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 blocks.rb
View
12 blocks.rb
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+
+require 'benchmark'
+include Benchmark
+
+def a(&b)
+ Benchmark.benchmark(CAPTION) do |x|
+ x.report('wow:',&b)
+ end
+end
+
+a { sleep 1 }

0 comments on commit 9481316

Please sign in to comment.