Represents a packet timestamp.
More...
#include <timestamp.h>
|
typedef time_t | seconds_type |
|
typedef suseconds_t | microseconds_type |
|
Represents a packet timestamp.
◆ Timestamp() [1/3]
Tins::Timestamp::Timestamp |
( |
| ) |
|
Default constructs a timestamp.
◆ Timestamp() [2/3]
template<typename Rep , typename Period >
Tins::Timestamp::Timestamp |
( |
const std::chrono::duration< Rep, Period > & | ts | ) |
|
|
inline |
Constructs a Timestamp from a std::chrono::duration.
◆ Timestamp() [3/3]
Tins::Timestamp::Timestamp |
( |
const timeval & | time_val | ) |
|
Constructs a timestamp from a timeval struct.
- Parameters
-
time_val | The timeval struct |
◆ microseconds()
Timestamp::microseconds_type Tins::Timestamp::microseconds |
( |
| ) |
const |
Returns the rest of the time in this timestamp in microseconds.
This is, after subtracting the seconds part, how many microseconds are left in this timestamp
◆ operator std::chrono::microseconds()
Tins::Timestamp::operator std::chrono::microseconds |
( |
| ) |
const |
|
inline |
Converts this Timestamp to a std::chrono::microseconds
◆ seconds()
Timestamp::seconds_type Tins::Timestamp::seconds |
( |
| ) |
const |
Returns the amount of seconds in this timestamp.
The documentation for this class was generated from the following files:
- /builddir/build/BUILD/libtins-4.5-build/libtins-4.5/include/tins/timestamp.h
- /builddir/build/BUILD/libtins-4.5-build/libtins-4.5/src/timestamp.cpp