10using namespace Microsoft::VisualStudio::CppUnitTestFramework;
20 volatile bool wd_called =
false;
22 std::chrono::milliseconds(100), [&] { wd_called =
true; });
23 for (
int i = 0; i < 100; ++i) {
24 std::this_thread::sleep_for(std::chrono::milliseconds(10));
25 Assert::IsFalse(wd_called);
28 std::this_thread::sleep_for(std::chrono::milliseconds(300));
29 Assert::IsTrue(wd_called);
Triggers callback if not reset frequently enough.
Definition watchdog.hpp:22