CppELib 1.7.0
Loading...
Searching...
No Matches
Timeout.h
Go to the documentation of this file.
1#ifndef OS_WRAPPER_TIMEOUT_H_INCLUDED
2#define OS_WRAPPER_TIMEOUT_H_INCLUDED
3
4namespace OSWrapper {
5
11class Timeout {
12private:
13 long m_milliseconds;
14
15 Timeout& operator=(const Timeout&);
16public:
21 explicit Timeout(long milliseconds) : m_milliseconds(milliseconds) {}
22
27 Timeout(const Timeout& tmout) : m_milliseconds(tmout.m_milliseconds) {}
28
32 operator long() const { return m_milliseconds; }
33
37 static const Timeout POLLING;
38
42 static const Timeout FOREVER;
43};
44
45}
46
47#endif // OS_WRAPPER_TIMEOUT_H_INCLUDED
Value object for the timeout.
Definition Timeout.h:11
static const Timeout FOREVER
Constant value object for waiting forever until condition satisfied.
Definition Timeout.h:42
static const Timeout POLLING
Constant value object for non-blocking.
Definition Timeout.h:37
Timeout(long milliseconds)
Constructor of Timeout.
Definition Timeout.h:21
Timeout(const Timeout &tmout)
Copy constructor of Timeout.
Definition Timeout.h:27
OSWrapper provides abstract C++ interface of common RTOS: thread, mutex, event flag,...
Definition EventFlag.cpp:5