Home | History | Annotate | Download | only in threading

Lines Matching refs:Watchdog

5 #include "base/threading/watchdog.h"
20 class WatchdogCounter : public Watchdog {
25 : Watchdog(duration, thread_watched_name, enabled), alarm_counter_(0) {
32 Watchdog::Alarm();
46 Watchdog::ResetStaticData();
57 Watchdog watchdog1(TimeDelta::FromMilliseconds(300), "Disabled", false);
58 Watchdog watchdog2(TimeDelta::FromMilliseconds(300), "Enabled", true);
63 Watchdog watchdog1(TimeDelta::FromMilliseconds(300), "Disabled", false);
69 Watchdog watchdog2(TimeDelta::FromMilliseconds(300), "Enabled", true);
78 WatchdogCounter watchdog(TimeDelta::FromMilliseconds(10), "Enabled", true);
79 watchdog.Arm();
81 watchdog.alarm_counter() > 0);
82 EXPECT_EQ(1, watchdog.alarm_counter());
87 WatchdogCounter watchdog(TimeDelta(), "Enabled2", true);
89 watchdog.ArmSomeTimeDeltaAgo(TimeDelta::FromSeconds(2));
92 watchdog.alarm_counter() > 0);
94 EXPECT_EQ(1, watchdog.alarm_counter());
99 WatchdogCounter watchdog(TimeDelta::FromMilliseconds(10), "Disabled", false);
100 watchdog.Arm();
103 EXPECT_EQ(0, watchdog.alarm_counter());
108 WatchdogCounter watchdog(TimeDelta::FromSeconds(1), "Enabled3", true);
111 watchdog.Arm();
113 watchdog.Disarm();
123 EXPECT_EQ(0, watchdog.alarm_counter());
128 EXPECT_EQ(0, watchdog.alarm_counter());
132 watchdog.ArmSomeTimeDeltaAgo(TimeDelta::FromSeconds(10));
135 watchdog.alarm_counter() > 0);
137 EXPECT_EQ(1, watchdog.alarm_counter());