Module: Vedeu::Logging::ClockTime
- Defined in:
- lib/vedeu/logging/clock_time.rb
Overview
If the system supports Process::CLOCK_MONOTONIC use that for timestamps.
Class Method Summary collapse
Class Method Details
.clock_time ⇒ Float|Time
16 17 18 19 20 21 22 23 24 |
# File 'lib/vedeu/logging/clock_time.rb', line 16 def self.clock_time if defined?(Process::CLOCK_MONOTONIC) Process.clock_gettime(Process::CLOCK_MONOTONIC) else Time.now end end |