Module: Rdkafka::Helpers::Time

Included in:
AbstractHandle, Consumer, Producer
Defined in:
lib/rdkafka/helpers/time.rb

Overview

Time related methods used across Karafka

Instance Method Summary collapse

Instance Method Details

#monotonic_nowFloat

Returns current monotonic time in seconds with microsecond precision.

Returns:

  • (Float)

    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