Sha256: 769e3ea33cec638da885ea9e362c1b8e36d6b30d8e9fa8527030f85ffdef941e

Contents?: true

Size: 448 Bytes

Versions: 54

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

module VagrantPlugins
  module ProviderZone
    module Util
      # This is a utlity to time commands and scripts
      class Timer
        # A basic utility method that times the execution of the given
        # block and returns it.
        def self.time
          start_time = Time.now.to_f
          yield
          end_time = Time.now.to_f
          end_time - start_time
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
vagrant-zones-0.1.98 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.97 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.96 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.94 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.93 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.92 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.91 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.90 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.89 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.88 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.87 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.86 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.85 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.84 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.83 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.82 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.81 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.80 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.79 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.78 lib/vagrant-zones/util/timer.rb