ADTF
Loading...
Searching...
No Matches
kernel_timeout.h
Go to the documentation of this file.
1
7#include "kernel_timer.h"
8
9namespace adtf
10{
11
12namespace system
13{
14
19{
20 private:
21 kernel_timer m_oTimer;
22
23 public:
27 template <typename Callable, typename ...Args>
28 tResult Start(const char* strName,
29 std::chrono::microseconds tmTimeout,
30 Callable&& oMethod, Args&&... args)
31 {
32 RETURN_IF_FAILED(Cancel());
33
34 m_oTimer = kernel_timer(strName, 0, tmTimeout.count(), oMethod, std::forward<Args>(args)...);
35 if (!m_oTimer.Stoppable())
36 {
37 RETURN_ERROR(ERR_UNEXPECTED);
38 }
39
41 }
42
48};
49
50}
51
52}
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
Definition result.h:42
Definition kernel_timeout.h:19
tResult Start(const char *strName, std::chrono::microseconds tmTimeout, Callable &&oMethod, Args &&... args)
Definition kernel_timeout.h:28
Definition kernel_timer.h:20
Namespace for the ADTF System SDK.
Definition adtf_service.h:14
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14