Class: ElasticGraph::Support::MonotonicClock
- Inherits:
-
Object
- Object
- ElasticGraph::Support::MonotonicClock
- Defined in:
- lib/elastic_graph/support/monotonic_clock.rb
Overview
A simple abstraction that provides a monotonic clock.
Instance Method Summary collapse
-
#now_in_ms ⇒ Object
Returns an abstract “now” value in integer milliseconds, suitable for calculating a duration or deadline, without being impacted by leap seconds, etc.
Instance Method Details
#now_in_ms ⇒ Object
Returns an abstract “now” value in integer milliseconds, suitable for calculating a duration or deadline, without being impacted by leap seconds, etc.
15 16 17 |
# File 'lib/elastic_graph/support/monotonic_clock.rb', line 15 def now_in_ms ::Process.clock_gettime(::Process::CLOCK_MONOTONIC, :millisecond) end |