IDS peak genericC++ v1.12.0
Loading...
Searching...
No Matches
peak_timeout.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
14
15#include <chrono>
16#include <cstdint>
17
18namespace peak
19{
20namespace core
21{
22
31{
32public:
38 static constexpr uint64_t INFINITE_TIMEOUT = PEAK_INFINITE_TIMEOUT;
39
40 Timeout(uint64_t timeout = 0) noexcept
41 : m_timeout(timeout)
42 {}
43
44 Timeout(std::chrono::milliseconds timeout) noexcept
45 : m_timeout(timeout)
46 {}
47
48 operator uint64_t() const
49 {
50 return static_cast<uint64_t>(m_timeout.count());
51 }
52
53private:
54 std::chrono::milliseconds m_timeout;
55};
56
57} /* namespace core */
58} /* namespace peak */
Timeout(uint64_t timeout=0) noexcept
Definition peak_timeout.hpp:40
static constexpr uint64_t INFINITE_TIMEOUT
The constant defining an infinite timeout.
Definition peak_timeout.hpp:38
Timeout(std::chrono::milliseconds timeout) noexcept
Definition peak_timeout.hpp:44
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:34
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33