class method self.monotonic_subscribe

Ruby on Rails 8.0.4

Since v6.1.7.10

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.monotonic_subscribe(pattern = nil, callback = nil, &block)

Performs the same functionality as #subscribe, but the start and finish block arguments are in monotonic time instead of wall-clock time. Monotonic time will not jump forward or backward (due to NTP or Daylights Savings). Use monotonic_subscribe when accuracy of time duration is important. For example, computing elapsed time between two events.

Parameters

pattern opt = nil
callback opt = nil
block block
Source
# File activesupport/lib/active_support/notifications.rb, line 254
      def monotonic_subscribe(pattern = nil, callback = nil, &block)
        notifier.subscribe(pattern, callback, monotonic: true, &block)
      end

Defined in activesupport/lib/active_support/notifications.rb line 254 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Notifications

Type at least 2 characters to search.

↑↓ navigate · open · esc close