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.55 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.54 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.52 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.48 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.46 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.44 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.12 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.10 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.9 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.8 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.41 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.1.3 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.0.12 lib/vagrant-zones/util/timer.rb
vagrant-zones-0.0.1 lib/vagrant-zones/util/timer.rb