Sha256: eed2811788be643132248e3eeee3ad55cc0785ab196864bcd937271566ebcec6

Contents?: true

Size: 366 Bytes

Versions: 13

Compression:

Stored size: 366 Bytes

Contents

module VagrantPlugins
  module ManagedServers
    module Util
      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

13 entries across 13 versions & 1 rubygems

Version Path
vagrant-managed-servers-0.8.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.7.1 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.7.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.6.2 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.6.1 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.6.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.5.1 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.5.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.4.1 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.4.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.3.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.2.0 lib/vagrant-managed-servers/util/timer.rb
vagrant-managed-servers-0.1.0 lib/vagrant-managed-servers/util/timer.rb