Module: Timeable
- Included in:
- Devpack::Gems, Devpack::Initializers
- Defined in:
- lib/devpack/timeable.rb
Overview
Provides result and run time of a given block.
Instance Method Summary collapse
Instance Method Details
#timed ⇒ Object
5 6 7 8 9 |
# File 'lib/devpack/timeable.rb', line 5 def timed start = Time.now.utc result = yield [result, Time.now.utc - start] end |