8#ifndef __LIBGPIOD_CXX_TIMESTAMP_HPP__
9#define __LIBGPIOD_CXX_TIMESTAMP_HPP__
11#if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
12#error "Only gpiod.hpp can be included directly."
37 ::std::chrono::nanoseconds>;
76 operator ::std::uint64_t() noexcept
85 ::std::uint64_t
ns() const noexcept
109 ::std::uint64_t _m_ns;
Stores the edge and info event timestamps as returned by the kernel and allows to convert them to std...
Definition timestamp.hpp:25
timestamp & operator=(timestamp &&other) noexcept=default
Move assignment operator.
::std::uint64_t ns() const noexcept
Get the timestamp in nanoseconds.
Definition timestamp.hpp:85
timestamp(timestamp &&other) noexcept=default
Move constructor.
::std::chrono::time_point<::std::chrono::steady_clock > time_point_monotonic
Monotonic time_point.
Definition timestamp.hpp:31
::std::chrono::time_point<::std::chrono::system_clock, ::std::chrono::nanoseconds > time_point_realtime
Real-time time_point.
Definition timestamp.hpp:36
timestamp(const timestamp &other) noexcept=default
Copy constructor.
timestamp & operator=(const timestamp &other) noexcept=default
Assignment operator.
time_point_realtime to_time_point_realtime() const
Convert the timestamp to a real-time time_point.
Definition timestamp.hpp:103
timestamp(::std::uint64_t ns)
Constructor with implicit conversion from uint64_t.
Definition timestamp.hpp:43
time_point_monotonic to_time_point_monotonic() const
Convert the timestamp to a monotonic time_point.
Definition timestamp.hpp:94
Definition chip-info.hpp:18