Module: Picky::Helpers::Measuring
Instance Method Summary collapse
-
#timed ⇒ Object
Returns a duration in seconds.
Instance Method Details
#timed ⇒ Object
Returns a duration in seconds.
10 11 12 13 14 15 16 |
# File 'lib/picky/helpers/measuring.rb', line 10 def timed time_begin = Time.new yield (Time.new - time_begin).to_f end |