Class: Time
Overview
time
Class Method Summary collapse
-
.time(smsg = "", emsg = "%s seconds") ⇒ Object
Simple benchmark function.
Class Method Details
.time(smsg = "", emsg = "%s seconds") ⇒ Object
Simple benchmark function. Time.time(start_msg) { … }
72 73 74 75 76 77 78 79 80 |
# File 'lib/el4r/el4r-sub.rb', line 72 def Time.time(smsg="", emsg="%s seconds") s=Time.now print smsg puts if smsg != "" yield sec=Time.now - s printf emsg, sec puts "" end |