Class: VagrantPlugins::Google::Util::Timer
- Inherits:
-
Object
- Object
- VagrantPlugins::Google::Util::Timer
- Defined in:
- lib/vagrant-google/util/timer.rb
Class Method Summary collapse
-
.time ⇒ Object
A basic utility method that times the execution of the given block and returns it.
Class Method Details
.time ⇒ Object
A basic utility method that times the execution of the given block and returns it.
20 21 22 23 24 25 26 |
# File 'lib/vagrant-google/util/timer.rb', line 20 def self.time start_time = Time.now.to_f yield end_time = Time.now.to_f end_time - start_time end |