aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorVishal Telangre <the@vishaltelangre.com>2019-04-16 03:30:24 +0530
committerVishal Telangre <the@vishaltelangre.com>2019-04-16 03:30:24 +0530
commitf2a80db56b9e8d5b33127356036602431dc08cd5 (patch)
tree191757dce700d8b7dda563330378013962e27490 /activesupport/lib
parentcb9c86bc8316a9b63599b989df6db6becb4fcb3b (diff)
downloadrails-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/lib')
-rw-r--r--activesupport/lib/active_support/notifications/fanout.rb4
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