Chromium Code Reviews| Index: base/tracking_info.h |
| diff --git a/base/tracking_info.h b/base/tracking_info.h |
| index dacbcea1d2b9d83a4734b5c5b21216f4cac004f7..ad9d93d86e0d7af56fb1c2848a13b0f9a98c25fd 100644 |
| --- a/base/tracking_info.h |
| +++ b/base/tracking_info.h |
| @@ -27,6 +27,14 @@ struct BASE_EXPORT TrackingInfo { |
| base::TimeTicks delayed_run_time); |
| ~TrackingInfo(); |
| + base::TimeTicks ExpectedRunTime() const { |
| + return delayed_run_time.is_null() ? time_posted : delayed_run_time; |
| + } |
| + |
| + base::TimeDelta DurationSinceExpectedRunTime() const { |
| + return TimeTicks::Now() - ExpectedRunTime(); |
|
jar (doing other things)
2013/07/08 17:08:33
nit: Now() is generally considered an expensive ca
Xianzhu
2013/07/08 18:51:39
Changed to use TrackedTime to avoid lock on Window
jar (doing other things)
2013/07/08 23:14:19
Yeah... that will go a lot faster. It uses a trun
|
| + } |
| + |
| // Record of location and thread that the task came from. |
| tracked_objects::Births* birth_tally; |