Index: base/threading/worker_pool_posix.cc |
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc |
index f00d7994d017e7559c2761eaed90401ed35ed743..aedcb73991e75f40e0c5b9e8eba7dffb5c3d98cf 100644 |
--- a/base/threading/worker_pool_posix.cc |
+++ b/base/threading/worker_pool_posix.cc |
@@ -95,14 +95,15 @@ void WorkerThread::ThreadMain() { |
"src_file", pending_task.posted_from.file_name(), |
"src_func", pending_task.posted_from.function_name()); |
- TrackedTime start_time = |
- tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally); |
- |
+ tracked_objects::TaskStopwatch stopwatch; |
+ stopwatch.Start(tracked_objects::ThreadData::NowForStartOfRun( |
+ pending_task.birth_tally)); |
pending_task.task.Run(); |
+ stopwatch.Stop(tracked_objects::ThreadData::NowForEndOfRun()); |
tracked_objects::ThreadData::TallyRunOnWorkerThreadIfTracking( |
pending_task.birth_tally, TrackedTime(pending_task.time_posted), |
- start_time, tracked_objects::ThreadData::NowForEndOfRun()); |
+ stopwatch); |
} |
// The WorkerThread is non-joinable, so it deletes itself. |