Sha256: ddff4edad23b95eacb711d6046688fbbc7ee68bdb5a868af526c3a0ce64765c1

Contents?: true

Size: 454 Bytes

Versions: 91

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true

module Listen
  module MonotonicTime
    class << self
      if defined?(Process::CLOCK_MONOTONIC)

        def now
          Process.clock_gettime(Process::CLOCK_MONOTONIC)
        end

      elsif defined?(Process::CLOCK_MONOTONIC_RAW)

        def now
          Process.clock_gettime(Process::CLOCK_MONOTONIC_RAW)
        end

      else

        def now
          Time.now.to_f
        end

      end
    end
  end
end

Version data entries

91 entries across 91 versions & 6 rubygems

Version Path
harbr-0.1.91 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.90 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.89 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.88 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.87 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.86 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.85 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.84 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.83 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.82 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.81 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.80 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.79 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.78 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.77 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.76 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.75 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.74 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.73 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb
harbr-0.1.72 vendor/bundle/ruby/3.2.0/gems/listen-3.8.0/lib/listen/monotonic_time.rb