tests/watchdog: Add a helper for counting down with the watchdog

This reduces a bunch of duplicate code that loops through an event loop
to try and guage how long it took for the watchdog to expire.

Change-Id: Ib3b33e250b157df02eff39751277c564ea40705c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/watchdog_test.hpp b/test/watchdog_test.hpp
index 5b5348a..87c64e9 100644
--- a/test/watchdog_test.hpp
+++ b/test/watchdog_test.hpp
@@ -45,4 +45,8 @@
         // This is just to satisfy the constructor. Does not have
         // a need to check if the objects paths have been created.
         static constexpr auto TEST_PATH = "/test/path";
+
+        // Returns how long it took for the current watchdog timer to be
+        // disabled or have its timeRemaining reset.
+        seconds waitForWatchdog(seconds timeLimit);
 };