module Spectator::MonotonicTime

Gather a monotonically increasing number of nanoseconds. If Process::CLOCK_MONOTONIC is available we use that, otherwise we attempt to use java.lang.System.nanoTime if running in jruby, and fallback to the Time.now implementation

Public Instance Methods

time_in_nanoseconds() click to toggle source
# File lib/spectator/clock.rb, line 45
def time_in_nanoseconds
  Process.clock_gettime(Process::CLOCK_MONOTONIC, :nanosecond)
end