| Index: base/run_loop.cc
|
| diff --git a/base/run_loop.cc b/base/run_loop.cc
|
| index 8344aa41b1631f6946e242e9ef0efbafdee23279..9382f341c5ae8f17b0345a1caf08fa2da7c8a1be 100644
|
| --- a/base/run_loop.cc
|
| +++ b/base/run_loop.cc
|
| @@ -5,6 +5,7 @@
|
| #include "base/run_loop.h"
|
|
|
| #include "base/bind.h"
|
| +#include "base/tracked_objects.h"
|
|
|
| #if defined(OS_WIN)
|
| #include "base/message_loop/message_pump_dispatcher.h"
|
| @@ -46,7 +47,14 @@ RunLoop::~RunLoop() {
|
| void RunLoop::Run() {
|
| if (!BeforeRun())
|
| return;
|
| - loop_->RunHandler();
|
| + {
|
| + // Use task stopwatch to exclude the loop run time from the current task, if
|
| + // any.
|
| + tracked_objects::TaskStopwatch stopwatch;
|
| + stopwatch.Start();
|
| + loop_->RunHandler();
|
| + stopwatch.Stop();
|
| + }
|
| AfterRun();
|
| }
|
|
|
|
|