diff options
author | Vishal Telangre <the@vishaltelangre.com> | 2019-04-16 03:30:24 +0530 |
---|---|---|
committer | Vishal Telangre <the@vishaltelangre.com> | 2019-04-16 03:30:24 +0530 |
commit | f2a80db56b9e8d5b33127356036602431dc08cd5 (patch) | |
tree | 191757dce700d8b7dda563330378013962e27490 /activesupport | |
parent | cb9c86bc8316a9b63599b989df6db6becb4fcb3b (diff) | |
download | rails-f2a80db56b9e8d5b33127356036602431dc08cd5.tar.gz rails-f2a80db56b9e8d5b33127356036602431dc08cd5.tar.bz2 rails-f2a80db56b9e8d5b33127356036602431dc08cd5.zip |
Use monotonic time to record `started` and `finished` time values for an event subscribed by a `ActiveSupport::Notifications::Fanout::Subscribers::Timed` subscriber
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/notifications/fanout.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index c506b35b1e..8812b67f63 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 Time.now + timestack.push Concurrent.monotonic_time end def finish(name, id, payload) timestack = Thread.current[:_timestack] started = timestack.pop - @delegate.call(name, started, Time.now, id, payload) + @delegate.call(name, started, Concurrent.monotonic_time, id, payload) end end |