#include "base/timer/timer.h"
#include <stddef.h>
#include <utility>
#include "base/check.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/memory/ref_counted.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_features.h"
#include "base/threading/platform_thread.h"
#include "base/time/tick_clock.h"
namespace base {
namespace internal {
TimerBase::TimerBase(const Location& posted_from) : … { … }
TimerBase::~TimerBase() { … }
bool TimerBase::IsRunning() const { … }
void TimerBase::SetTaskRunner(scoped_refptr<SequencedTaskRunner> task_runner) { … }
scoped_refptr<SequencedTaskRunner> TimerBase::GetTaskRunner() { … }
void TimerBase::Stop() { … }
void TimerBase::AbandonScheduledTask() { … }
DelayTimerBase::DelayTimerBase(const TickClock* tick_clock)
: … { … }
DelayTimerBase::DelayTimerBase(const Location& posted_from,
TimeDelta delay,
const TickClock* tick_clock)
: … { … }
DelayTimerBase::~DelayTimerBase() = default;
TimeDelta DelayTimerBase::GetCurrentDelay() const { … }
void DelayTimerBase::StartInternal(const Location& posted_from,
TimeDelta delay) { … }
void DelayTimerBase::AbandonAndStop() { … }
void DelayTimerBase::Reset() { … }
void DelayTimerBase::ScheduleNewTask(TimeDelta delay) { … }
TimeTicks DelayTimerBase::Now() const { … }
void DelayTimerBase::OnScheduledTaskInvoked() { … }
}
OneShotTimer::OneShotTimer() = default;
OneShotTimer::OneShotTimer(const TickClock* tick_clock)
: … { … }
OneShotTimer::~OneShotTimer() = default;
void OneShotTimer::Start(const Location& posted_from,
TimeDelta delay,
OnceClosure user_task) { … }
void OneShotTimer::FireNow() { … }
void OneShotTimer::OnStop() { … }
void OneShotTimer::RunUserTask() { … }
void OneShotTimer::EnsureNonNullUserTask() { … }
RepeatingTimer::RepeatingTimer() = default;
RepeatingTimer::RepeatingTimer(const TickClock* tick_clock)
: … { … }
RepeatingTimer::~RepeatingTimer() = default;
RepeatingTimer::RepeatingTimer(const Location& posted_from,
TimeDelta delay,
RepeatingClosure user_task)
: … { … }
RepeatingTimer::RepeatingTimer(const Location& posted_from,
TimeDelta delay,
RepeatingClosure user_task,
const TickClock* tick_clock)
: … { … }
void RepeatingTimer::Start(const Location& posted_from,
TimeDelta delay,
RepeatingClosure user_task) { … }
void RepeatingTimer::OnStop() { … }
void RepeatingTimer::RunUserTask() { … }
void RepeatingTimer::EnsureNonNullUserTask() { … }
RetainingOneShotTimer::RetainingOneShotTimer() = default;
RetainingOneShotTimer::RetainingOneShotTimer(const TickClock* tick_clock)
: … { … }
RetainingOneShotTimer::~RetainingOneShotTimer() = default;
RetainingOneShotTimer::RetainingOneShotTimer(const Location& posted_from,
TimeDelta delay,
RepeatingClosure user_task)
: … { … }
RetainingOneShotTimer::RetainingOneShotTimer(const Location& posted_from,
TimeDelta delay,
RepeatingClosure user_task,
const TickClock* tick_clock)
: … { … }
void RetainingOneShotTimer::Start(const Location& posted_from,
TimeDelta delay,
RepeatingClosure user_task) { … }
void RetainingOneShotTimer::OnStop() { … }
void RetainingOneShotTimer::RunUserTask() { … }
void RetainingOneShotTimer::EnsureNonNullUserTask() { … }
DeadlineTimer::DeadlineTimer() = default;
DeadlineTimer::~DeadlineTimer() = default;
void DeadlineTimer::Start(const Location& posted_from,
TimeTicks deadline,
OnceClosure user_task,
subtle::DelayPolicy delay_policy) { … }
void DeadlineTimer::OnStop() { … }
void DeadlineTimer::ScheduleNewTask(TimeTicks deadline,
subtle::DelayPolicy delay_policy) { … }
void DeadlineTimer::OnScheduledTaskInvoked() { … }
MetronomeTimer::MetronomeTimer() = default;
MetronomeTimer::~MetronomeTimer() = default;
MetronomeTimer::MetronomeTimer(const Location& posted_from,
TimeDelta interval,
RepeatingClosure user_task,
TimeTicks phase)
: … { … }
void MetronomeTimer::Start(const Location& posted_from,
TimeDelta interval,
RepeatingClosure user_task,
TimeTicks phase) { … }
void MetronomeTimer::OnStop() { … }
void MetronomeTimer::Reset() { … }
void MetronomeTimer::ScheduleNewTask() { … }
void MetronomeTimer::OnScheduledTaskInvoked() { … }
}