Sha256: 72a674c880ac8d9125ea2ac32722187deff321e38f032ebe44cd254ff50a46db

Contents?: true

Size: 878 Bytes

Versions: 8

Compression:

Stored size: 878 Bytes

Contents

require 'rubygems'
begin
  require 'rspec' # rspec2
rescue LoadError
  require 'spec' # rspec1
  require 'spec/autorun'
end

# some useful utilities...

require 'sane'
require 'benchmark'
Thread.abort_on_exception = true
require 'timeout'
require 'fileutils'

begin
  require 'hitimes'
  Benchmark.module_eval {
    def self.realtime
      Hitimes::Interval.measure { yield }
    end
  }
rescue LoadError
  if RUBY_PLATFORM =~ /java/
    require 'java'
    Benchmark.module_eval {
      def self.realtime
        beginy = java.lang.System.nano_time
        yield
        (java.lang.System.nano_time - beginy)/1000000000.0
      end
    }
  else
      puts 'no hitimes available...'
  end
    
end

#for file in Dir[File.dirname(__FILE__) + "/../lib/*"] do
  # don't load them here in case one or other fails...
  # require file
  #end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sensible-cinema-0.7.5 spec/common.rb
sensible-cinema-0.7.4 spec/common.rb
sensible-cinema-0.7.3 spec/common.rb
sensible-cinema-0.7.2 spec/common.rb
sensible-cinema-0.7.1 spec/common.rb
sensible-cinema-0.7.0 spec/common.rb
sensible-cinema-0.6.1 spec/common.rb
sensible-cinema-0.6.0 spec/common.rb