Lines Matching refs:Timer
5 #include "base/timer/timer.h"
24 // The message loops on which each timer should be tested.
131 // This should run before the timer expires.
134 // Now start the timer.
180 // This should run before the timer expires.
183 // Now start the timer.
212 // If Delay is never called, the timer shouldn't go off.
214 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target,
229 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target,
231 timer.Reset();
242 ResetHelper(base::DelayTimer* timer, DelayTimerTarget* target)
243 : timer_(timer), target_(target) {}
258 // If Delay is never called, the timer shouldn't go off.
260 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target,
262 timer.Reset();
264 ResetHelper reset_helper(&timer, &target);
294 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target,
296 timer.Reset();
299 // When the timer is deleted, the DelayTimerFatalTarget should never be
322 // If underline timer does not handle properly, we will crash or fail
424 base::Timer timer(false, false);
425 EXPECT_FALSE(timer.IsRunning());
426 timer.Start(FROM_HERE, TimeDelta::FromDays(1),
428 EXPECT_TRUE(timer.IsRunning());
429 timer.Stop();
430 EXPECT_FALSE(timer.IsRunning());
431 EXPECT_TRUE(timer.user_task().is_null());
435 base::Timer timer(true, false);
437 EXPECT_FALSE(timer.IsRunning());
438 timer.Start(FROM_HERE, TimeDelta::FromDays(1),
440 EXPECT_TRUE(timer.IsRunning());
441 timer.Stop();
442 EXPECT_FALSE(timer.IsRunning());
443 ASSERT_FALSE(timer.user_task().is_null());
444 timer.Reset();
445 EXPECT_TRUE(timer.IsRunning());
450 base::Timer timer(false, false);
453 EXPECT_FALSE(timer.IsRunning());
454 timer.Start(FROM_HERE, TimeDelta::FromDays(1),
456 EXPECT_TRUE(timer.IsRunning());
458 EXPECT_FALSE(timer.IsRunning());
459 EXPECT_TRUE(timer.user_task().is_null());
464 base::Timer timer(FROM_HERE, TimeDelta::FromDays(1),
466 EXPECT_FALSE(timer.IsRunning());
467 timer.Reset();
468 EXPECT_TRUE(timer.IsRunning());
469 timer.Stop();
470 EXPECT_FALSE(timer.IsRunning());
471 timer.Reset();
472 EXPECT_TRUE(timer.IsRunning());
477 base::Timer timer(FROM_HERE, TimeDelta::FromDays(1),
479 EXPECT_FALSE(timer.IsRunning());
480 timer.Reset();
481 EXPECT_TRUE(timer.IsRunning());
482 timer.Stop();
483 EXPECT_FALSE(timer.IsRunning());
484 timer.Reset();
485 EXPECT_TRUE(timer.IsRunning());
512 base::Timer timer(false, false);
513 timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10),
515 timer.Stop();
516 timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(40),
528 base::Timer timer(false, false);
529 timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10),
531 timer.Reset();
533 ASSERT_FALSE(timer.user_task().is_null());