Method: Datadog::Core::Utils::Time.now_provider=
- Defined in:
- lib/datadog/core/utils/time.rb
permalink .now_provider=(block) ⇒ Object
Overrides the implementation of ‘#now with the provided callable.
Overriding the method ‘#now` instead of indirectly calling `block` removes one level of method call overhead.
33 34 35 |
# File 'lib/datadog/core/utils/time.rb', line 33 def now_provider=(block) define_singleton_method(:now, &block) end |