• Home
  • Raw
  • Download

Lines Matching full:timer

5 #include "base/timer/timer.h"
20 // BaseTimerTaskInternal is a simple delegate for scheduling a callback to Timer
23 // - abandoned (orphaned) by Timer.
26 explicit BaseTimerTaskInternal(Timer* timer) in BaseTimerTaskInternal() argument
27 : timer_(timer) { in BaseTimerTaskInternal()
32 // destructed. If so, don't leave Timer with a dangling pointer in ~BaseTimerTaskInternal()
43 // |this| will be deleted by the task runner, so Timer needs to forget us: in Run()
46 // Although Timer should not call back into |this|, let's clear |timer_| in Run()
48 Timer* timer = timer_; in Run() local
50 timer->RunScheduledTask(); in Run()
57 Timer* timer_;
62 Timer::Timer(bool retain_user_task, bool is_repeating) in Timer() function in base::Timer
63 : Timer(retain_user_task, is_repeating, nullptr) {} in Timer()
65 Timer::Timer(bool retain_user_task, in Timer() function in base::Timer
73 // It is safe for the timer to be created on a different thread/sequence than in Timer()
74 // the one from which the timer APIs are called. The first call to the in Timer()
80 Timer::Timer(const Location& posted_from, in Timer() function in base::Timer
84 : Timer(posted_from, delay, user_task, is_repeating, nullptr) {} in Timer()
86 Timer::Timer(const Location& posted_from, in Timer() function in base::Timer
103 Timer::~Timer() { in ~Timer()
108 bool Timer::IsRunning() const { in IsRunning()
113 TimeDelta Timer::GetCurrentDelay() const { in GetCurrentDelay()
118 void Timer::SetTaskRunner(scoped_refptr<SequencedTaskRunner> task_runner) { in SetTaskRunner()
119 // Do not allow changing the task runner when the Timer is running. in SetTaskRunner()
121 // allow the use case of constructing the Timer and immediatetly invoking in SetTaskRunner()
130 void Timer::Start(const Location& posted_from, in Start()
142 void Timer::Stop() { in Stop()
149 // It's safe to destroy or restart Timer on another sequence after Stop(). in Stop()
158 void Timer::Reset() { in Reset()
186 TimeTicks Timer::Now() const { in Now()
193 void Timer::PostNewScheduledTask(TimeDelta delay) { in PostNewScheduledTask()
217 scoped_refptr<SequencedTaskRunner> Timer::GetTaskRunner() { in GetTaskRunner()
221 void Timer::AbandonScheduledTask() { in AbandonScheduledTask()
231 void Timer::RunScheduledTask() { in RunScheduledTask()