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