Index: base/threading/sequenced_worker_pool.cc |
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc |
index 532f26ebe5c784eba7613045ef99f5c40b012714..9e51d645894dafe379a6dc3c244ab0b42d8f2b87 100644 |
--- a/base/threading/sequenced_worker_pool.cc |
+++ b/base/threading/sequenced_worker_pool.cc |
@@ -755,13 +755,14 @@ void SequencedWorkerPool::Inner::ThreadLoop(Worker* this_worker) { |
this_worker->set_running_task_info( |
SequenceToken(task.sequence_token_id), task.shutdown_behavior); |
- tracked_objects::TrackedTime start_time = |
- tracked_objects::ThreadData::NowForStartOfRun(task.birth_tally); |
- |
+ tracked_objects::TaskStopwatch stopwatch; |
+ stopwatch.Start( |
+ tracked_objects::ThreadData::NowForStartOfRun(task.birth_tally)); |
jar (doing other things)
2014/09/02 16:52:16
The reason there is an API called NowForStartOfRun
vadimt
2014/09/02 22:41:37
Done.
|
task.task.Run(); |
+ stopwatch.Stop(tracked_objects::ThreadData::NowForEndOfRun()); |
jar (doing other things)
2014/09/02 16:52:16
This call can then be simply:
stopwatch.Stop();
I
vadimt
2014/09/02 22:41:37
Done.
Given that there are 3 methods that can foll
|
- tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(task, |
- start_time, tracked_objects::ThreadData::NowForEndOfRun()); |
+ tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking( |
+ task, stopwatch); |
jar (doing other things)
2014/09/02 16:52:16
If you're willing to embed the Stop() into the abo
vadimt
2014/09/02 22:41:36
See the above answer.
|
// Make sure our task is erased outside the lock for the |
// same reason we do this with delete_these_oustide_lock. |