Class of time stamps.
More...
#include <num_collect/logging/time_stamp.h>
|
| time_stamp (std::time_t seconds, std::uint32_t nanoseconds) noexcept |
| Constructor.
|
|
auto | nanoseconds () const noexcept -> std::uint32_t |
| Get the number of nanoseconds from the time specified by seconds.
|
|
auto | seconds () const noexcept -> std::time_t |
| Get the number of seconds from the epoch.
|
|
|
static auto | now () noexcept -> time_stamp |
| Get the current time stamp.
|
|
|
std::uint32_t | nanoseconds_ |
| Number of nanoseconds from the time specified by seconds_ (from 0 to 999999999).
|
|
std::time_t | seconds_ |
| Number of seconds from the epoch.
|
|
Class of time stamps.
- Note
- This class uses UTC time.
Definition at line 38 of file time_stamp.h.
◆ time_stamp()
num_collect::logging::time_stamp::time_stamp |
( |
std::time_t | seconds, |
|
|
std::uint32_t | nanoseconds ) |
|
noexcept |
Constructor.
- Parameters
-
[in] | seconds | Number of seconds from the epoch. |
[in] | nanoseconds | Number of nanoseconds from the time specified by seconds (from 0 to 999999999). |
◆ nanoseconds()
auto num_collect::logging::time_stamp::nanoseconds |
( |
| ) |
const -> std::uint32_t |
|
nodiscardnoexcept |
Get the number of nanoseconds from the time specified by seconds.
- Returns
- Number of nanoseconds from the time specified by seconds.
◆ now()
static auto num_collect::logging::time_stamp::now |
( |
| ) |
-> time_stamp |
|
staticnodiscardnoexcept |
Get the current time stamp.
- Returns
- Time stamp.
◆ seconds()
auto num_collect::logging::time_stamp::seconds |
( |
| ) |
const -> std::time_t |
|
nodiscardnoexcept |
Get the number of seconds from the epoch.
- Returns
- Number of seconds from the epoch.
◆ nanoseconds_
std::uint32_t num_collect::logging::time_stamp::nanoseconds_ |
|
private |
Number of nanoseconds from the time specified by seconds_ (from 0 to 999999999).
Definition at line 75 of file time_stamp.h.
◆ seconds_
std::time_t num_collect::logging::time_stamp::seconds_ |
|
private |
Number of seconds from the epoch.
Definition at line 72 of file time_stamp.h.
The documentation for this class was generated from the following file: