ADTF
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1
14
15#ifndef A_UTIL_UTIL_SYSTEM_SYSTEM_HEADER_INCLUDED
16#define A_UTIL_UTIL_SYSTEM_SYSTEM_HEADER_INCLUDED
17
18#include <a_util/base/types.h> //timestamp_t
19#include <a_util/filesystem/path.h> //Path
20
21#include <string>
22
23namespace a_util {
24namespace system {
29std::string getCurrentUserName();
30
35std::string getHostname();
36
42
48
51
57std::string formatSystemError(int system_error_code);
58
63void sleepMilliseconds(std::uint32_t ms);
64
70void sleepMicroseconds(std::uint64_t us);
71
77
84
91public:
94
97
102 bool isSupported() const;
103
104private:
106 HighResSchedulingSupport& operator=(const HighResSchedulingSupport&); // = delete;
107
108private:
109 unsigned int _handle;
110};
111
112} // namespace system
113} // namespace a_util
114
115#endif // A_UTIL_UTIL_SYSTEM_SYSTEM_HEADER_INCLUDED
Definition path.h:46
HighResSchedulingSupport()
CTOR - requests support from OS.
~HighResSchedulingSupport()
DTOR - relinquishes support from the OS.
std::int64_t timestamp_t
Type of a timestamp value. If not otherwise stated, always in microseconds.
Definition types.h:31
Serves as component for portable OS (Windows, Linux, ...) functionality.
Definition system.h:20
std::string getHostname()
void resetLastSystemError()
Reset last system error to its initial value.
void sleepMilliseconds(std::uint32_t ms)
timestamp_t getCurrentMicroseconds()
std::string formatSystemError(int system_error_code)
std::string getCurrentUserName()
timestamp_t getCurrentMilliseconds()
void sleepMicroseconds(std::uint64_t us)
a_util::filesystem::Path getExecutablePath()
int getLastSystemError()
Serves as the root component, with common functionality documented in core functionality.
Definition base.h:24