class VagrantPlugins::ProviderLibvirt::Util::Timer

Public Class Methods

time() { || ... } click to toggle source

A basic utility method that times the execution of the given block and returns it.

# File lib/vagrant-libvirt/util/timer.rb, line 8
def self.time
  start_time = Time.now.to_f
  yield
  end_time = Time.now.to_f

  end_time - start_time
end