Index: third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp |
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp b/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp |
index 047948087fd0da966275d2905ff87d85a956e29c..a646c324e9127c9edb351b30b1d6c859b4b2cf35 100644 |
--- a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp |
+++ b/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp |
@@ -52,6 +52,23 @@ namespace blink { |
namespace probe { |
+double ProbeBase::captureStartTime() const { |
+ if (!m_startTime) |
+ m_startTime = monotonicallyIncreasingTime(); |
+ return m_startTime; |
+} |
+ |
+double ProbeBase::captureEndTime() const { |
+ if (!m_endTime) |
+ m_endTime = monotonicallyIncreasingTime(); |
+ return m_endTime; |
+} |
+ |
+double ProbeBase::duration() const { |
+ DCHECK(m_startTime); |
+ return captureEndTime() - m_startTime; |
+} |
+ |
AsyncTask::AsyncTask(ExecutionContext* context, void* task) |
: AsyncTask(context, task, true) {} |