// relationships can be (optionally) calculated.
static void PrepareForStartOfRun(const Births* parent);
+ // Enables profiler timing.
+ static void EnableProfilerTiming();
+
// Provide a time function that does nothing (runs fast) when we don't have
// the profiler enabled. It will generally be optimized away when it is
// ifdef'ed to be small enough (allowing the profiler to be "compiled out" of
TaskStopwatch();
~TaskStopwatch();
+ // Starts stopwatch.
+ void Start();
+
// Stops stopwatch.
void Stop();
TaskStopwatch* parent_;
#if DCHECK_IS_ON
- // State of the stopwatch. Stopwatch is first constructed in a running state,
- // then stopped, then destructed.
- enum {
- RUNNING,
- STOPPED
- } state_;
+ // State of the stopwatch. Stopwatch is first constructed in a created state
+ // state, then is optionally started/stopped, then destructed.
+ enum { CREATED, RUNNING, STOPPED } state_;
// Currently running stopwatch that is directly nested in this one, if such
// stopwatch exists. NULL otherwise.