Top Level Namespace
Defined Under Namespace
Modules: Brut, Sequel Classes: Clock, ModuleName, PrefixedIO, RichString
Instance Method Summary collapse
Instance Method Details
#time_it(label, &block) ⇒ Object
1 2 3 4 5 6 7 8 |
# File 'lib/brut/framework/mcp.rb', line 1 def time_it(label,&block) start_time = Time.now result = block.call end_time = Time.now duration = end_time - start_time #printf "%30s - %.4f\n",label,duration result end |