Class: VagrantPlugins::ProviderZone::Util::Timer
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderZone::Util::Timer
- Defined in:
- lib/vagrant-zones/util/timer.rb
Overview
This is a utlity to time commands and scripts
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.
10 11 12 13 14 15 |
# File 'lib/vagrant-zones/util/timer.rb', line 10 def self.time start_time = Time.now.to_f yield end_time = Time.now.to_f end_time - start_time end |