| Index: base/profiler/alternate_timer.cc
|
| diff --git a/base/profiler/alternate_timer.cc b/base/profiler/alternate_timer.cc
|
| index abf91802061d267f7335ac489d5a7f36f98f4555..4eba89c255eca523c8ca69f821ab0575c7b14fe1 100644
|
| --- a/base/profiler/alternate_timer.cc
|
| +++ b/base/profiler/alternate_timer.cc
|
| @@ -9,6 +9,8 @@
|
| namespace {
|
|
|
| tracked_objects::NowFunction* g_time_function = NULL;
|
| +tracked_objects::TimeSourceType g_time_source_type =
|
| + tracked_objects::TIME_SOURCE_TYPE_WALL_TIME;
|
|
|
| } // anonymous namespace
|
|
|
| @@ -18,13 +20,18 @@ const char kAlternateProfilerTime[] = "CHROME_PROFILER_TIME";
|
|
|
| // Set an alternate timer function to replace the OS time function when
|
| // profiling.
|
| -void SetAlternateTimeSource(NowFunction* now_function) {
|
| +void SetAlternateTimeSource(NowFunction* now_function, TimeSourceType type) {
|
| DCHECK_EQ(reinterpret_cast<NowFunction*>(NULL), g_time_function);
|
| g_time_function = now_function;
|
| + g_time_source_type = type;
|
| }
|
|
|
| NowFunction* GetAlternateTimeSource() {
|
| return g_time_function;
|
| }
|
|
|
| +TimeSourceType GetTimeSourceType() {
|
| + return g_time_source_type;
|
| +}
|
| +
|
| } // namespace tracked_objects
|
|
|