From b9a9131fdb1a3e8aad7a18741c84f16ac33ddeaf Mon Sep 17 00:00:00 2001 From: Kevin Solorio Date: Tue, 30 Apr 2019 14:32:03 -0700 Subject: revert changes to monotonic times The change to monotonic times causes failures for applications where the subscribed block is expecting Time objects as described in this issue: https://github.com/rails/rails/issues/36145 The original PR (https://github.com/rails/rails/pull/35984) was concerned with errors on the cpu_time. Test was edited to reflect changes to initializer using 0 values instead of nil --- activesupport/lib/active_support/notifications/fanout.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index 8812b67f63..c506b35b1e 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -180,13 +180,13 @@ module ActiveSupport def start(name, id, payload) timestack = Thread.current[:_timestack] ||= [] - timestack.push Concurrent.monotonic_time + timestack.push Time.now end def finish(name, id, payload) timestack = Thread.current[:_timestack] started = timestack.pop - @delegate.call(name, started, Concurrent.monotonic_time, id, payload) + @delegate.call(name, started, Time.now, id, payload) end end -- cgit v1.2.3