Module: Rdkafka::Helpers::Time
- Included in:
- AbstractHandle, Consumer, Producer, Producer::PartitionsCountCache
- Defined in:
- lib/rdkafka/helpers/time.rb
Overview
Time related methods used across Karafka
Instance Method Summary collapse
-
#monotonic_now ⇒ Float
Current monotonic time in seconds with microsecond precision.
-
#monotonic_now_ms ⇒ Integer
Current monotonic time in milliseconds.
Instance Method Details
#monotonic_now ⇒ Float
Returns current monotonic time in seconds with microsecond precision.
9 10 11 |
# File 'lib/rdkafka/helpers/time.rb', line 9 def monotonic_now ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) end |
#monotonic_now_ms ⇒ Integer
Returns current monotonic time in milliseconds.
14 15 16 |
# File 'lib/rdkafka/helpers/time.rb', line 14 def monotonic_now_ms ::Process.clock_gettime(::Process::CLOCK_MONOTONIC, :millisecond) end |