class MonotonicTime
Access monotonic clock time (in seconds).
Constants
- NANOS_IN_SECOND
Public Class Methods
measure() { || ... }
click to toggle source
Return time taken by block execution (in seconds).
# File lib/monotonic_time.rb, line 8 def self.measure &b start = now yield now - start end
now()
click to toggle source
Return current monotonic clock time in seconds.
# File lib/monotonic_time.rb, line 15 def self.now Hitimes::Interval.now.start_instant.to_f/NANOS_IN_SECOND end