|
libtins 4.5
|
Represents a packet timestamp. More...
#include <timestamp.h>
Public Types | |
| typedef time_t | seconds_type |
| typedef suseconds_t | microseconds_type |
Public Member Functions | |
| Timestamp () | |
| template<typename Rep , typename Period > | |
| Timestamp (const std::chrono::duration< Rep, Period > &ts) | |
| Timestamp (const timeval &time_val) | |
| seconds_type | seconds () const |
| microseconds_type | microseconds () const |
| Returns the rest of the time in this timestamp in microseconds. | |
| operator std::chrono::microseconds () const | |
Static Public Member Functions | |
| static Timestamp | current_time () |
| Constructs a Timestamp which will hold the current time. | |
Represents a packet timestamp.
| Tins::Timestamp::Timestamp | ( | ) |
Default constructs a timestamp.
Constructs a Timestamp from a std::chrono::duration.
Constructs a timestamp from a timeval struct.
| time_val | The timeval struct |
| 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
|
inline |
Converts this Timestamp to a std::chrono::microseconds
| Timestamp::seconds_type Tins::Timestamp::seconds | ( | ) | const |
Returns the amount of seconds in this timestamp.