Module: Karafka::Core::Helpers::Time
- Included in:
- Monitoring::Notifications, Monitoring::StatisticsDecorator
- Defined in:
- lib/karafka/core/helpers/time.rb
Overview
Time related methods used across Karafka
Instance Method Summary collapse
-
#float_now ⇒ Float
Current time in float.
-
#monotonic_now ⇒ Float
Current monotonic time in milliseconds.
Instance Method Details
#float_now ⇒ Float
Returns current time in float.
22 23 24 |
# File 'lib/karafka/core/helpers/time.rb', line 22 def float_now ::Process.clock_gettime(::Process::CLOCK_REALTIME) end |
#monotonic_now ⇒ Float
Returns current monotonic time in milliseconds.
11 12 13 |
# File 'lib/karafka/core/helpers/time.rb', line 11 def monotonic_now ::Process.clock_gettime(::Process::CLOCK_MONOTONIC, :float_millisecond) end |