
Those files were recently moved from tools/mac/power/ to components/power_metrics/ and the namespaces were not updated. Change-Id: I7392e2802ae8663e435ce6c7b2dfff50471d223a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3335018 Auto-Submit: Patrick Monette <pmonette@chromium.org> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#952430}
23 lines
656 B
C++
23 lines
656 B
C++
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "components/power_metrics/timer_sampling_event_source.h"
|
|
|
|
#include "base/check.h"
|
|
|
|
namespace power_metrics {
|
|
|
|
TimerSamplingEventSource::TimerSamplingEventSource(base::TimeDelta interval)
|
|
: interval_(interval) {}
|
|
|
|
TimerSamplingEventSource::~TimerSamplingEventSource() = default;
|
|
|
|
bool TimerSamplingEventSource::Start(SamplingEventCallback callback) {
|
|
DCHECK(callback);
|
|
timer_.Start(FROM_HERE, interval_, std::move(callback));
|
|
return true;
|
|
}
|
|
|
|
} // namespace power_metrics
|