1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SCHEDULER_CHILD_LAZY_NOW_H_
6 #define COMPONENTS_SCHEDULER_CHILD_LAZY_NOW_H_
8 #include "base/time/time.h"
11 class TaskQueueManager
;
15 // Now() is somewhat expensive so it makes sense not to call Now() unless we
19 explicit LazyNow(base::TimeTicks now
)
20 : task_queue_manager_(nullptr), now_(now
) {
21 DCHECK(!now
.is_null());
24 explicit LazyNow(TaskQueueManager
* task_queue_manager
)
25 : task_queue_manager_(task_queue_manager
) {}
27 base::TimeTicks
Now();
30 TaskQueueManager
* task_queue_manager_
; // NOT OWNED
34 } // namespace internal
35 } // namespace scheduler
37 #endif // COMPONENTS_SCHEDULER_CHILD_LAZY_NOW_H_