SOLA
Loading...
Searching...
No Matches
watchdog.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_WATCHDOG_H_
8#define MINHTON_WATCHDOG_H_
9
10#include <functional>
11#include <memory>
12
13#include "minhton/core/constants.h"
14
15namespace minhton::core {
16
20class WatchDog {
21public:
22 WatchDog();
23 ~WatchDog();
24
25 WatchDog(const WatchDog &) = delete;
26 WatchDog &operator=(const WatchDog &) = delete;
27 WatchDog(const WatchDog &&) = delete;
28 WatchDog &operator=(const WatchDog &&) = delete;
29
35 void addJob(std::function<void()> function, uint32_t milliseconds, TimeoutType &timeout_type);
36
37 void cancelJob(const TimeoutType &timeout_type);
38
39private:
40 class Impl;
41 std::unique_ptr<Impl> pimpl_;
42};
43} // namespace minhton::core
44
45#endif // MINHTON_WATCHDOG_H_
Definition minhton_watchdog_ns3.cpp:25
Definition watchdog.h:20
void addJob(std::function< void()> function, uint32_t milliseconds, TimeoutType &timeout_type)
Definition minhton_watchdog_ns3.cpp:61