Sha256: 279f04db6ccb393d952989f8cccde49f5ff5a7a9659e3b8bfa2e3eb8c0d27df6

Contents?: true

Size: 282 Bytes

Versions: 21

Compression:

Stored size: 282 Bytes

Contents

module Benchmark::Driver::Time
  if defined?(Process::CLOCK_MONOTONIC)
    def self.now
      Process.clock_gettime(Process::CLOCK_MONOTONIC)
    end
  else
    $stderr.puts "Process::CLOCK_MONOTONIC was unavailable. Using Time."
    def self.now
      ::Time.now
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
benchmark_driver-0.4.0 lib/benchmark/driver/time.rb