|
stdex
Additional custom or not Standard C++ covered algorithms
|
Triggers callback if not reset frequently enough. More...
#include <stdex/watchdog.hpp>
Public Member Functions | |
| watchdog (_Duration timeout, std::function< void()> callback) | |
| Starts the watchdog. | |
| ~watchdog () | |
| Stops the watchdog. | |
| void | reset () |
| Resets the watchdog. | |
Protected Member Functions | |
| void | run () |
Triggers callback if not reset frequently enough.
|
inline |
Starts the watchdog.
| [in] | timeout | How long the watchdog is waiting for a reset |
| [in] | callback | The function watchdog calls on timeout |
|
inline |
Resets the watchdog.
Must be called frequently enough not to timeout the watchdog