#include "rtc_base/task_utils/repeating_task.h"
#include "absl/functional/any_invocable.h"
#include "api/task_queue/pending_task_safety_flag.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
class RepeatingTask { … };
RepeatingTask::RepeatingTask(
TaskQueueBase* task_queue,
TaskQueueBase::DelayPrecision precision,
TimeDelta first_delay,
absl::AnyInvocable<TimeDelta()> task,
Clock* clock,
rtc::scoped_refptr<PendingTaskSafetyFlag> alive_flag,
const Location& location)
: … { … }
void RepeatingTask::operator()() && { … }
}
RepeatingTaskHandle RepeatingTaskHandle::Start(
TaskQueueBase* task_queue,
absl::AnyInvocable<TimeDelta()> closure,
TaskQueueBase::DelayPrecision precision,
Clock* clock,
const Location& location) { … }
RepeatingTaskHandle RepeatingTaskHandle::DelayedStart(
TaskQueueBase* task_queue,
TimeDelta first_delay,
absl::AnyInvocable<TimeDelta()> closure,
TaskQueueBase::DelayPrecision precision,
Clock* clock,
const Location& location) { … }
void RepeatingTaskHandle::Stop() { … }
bool RepeatingTaskHandle::Running() const { … }
namespace webrtc_repeating_task_impl {
void RepeatingTaskHandleDTraceProbeStart() { … }
void RepeatingTaskHandleDTraceProbeDelayedStart() { … }
void RepeatingTaskImplDTraceProbeRun() { … }
}
}