qb::Timespan Class Reference

Public Member Functions

 Timespan (int64_t duration) noexcept
 
 Timespan (const Timespan &) noexcept=default
 
 Timespan (Timespan &&) noexcept=default
 
Timespanoperator= (int64_t duration) noexcept
 
Timespanoperator= (const Timespan &) noexcept=default
 
Timespanoperator= (Timespan &&) noexcept=default
 
Timespan operator+ () const
 
Timespan operator- () const
 
Timespanoperator+= (int64_t offset) noexcept
 
Timespanoperator+= (const Timespan &offset) noexcept
 
Timespanoperator-= (int64_t offset) noexcept
 
Timespanoperator-= (const Timespan &offset) noexcept
 
std::chrono::duration< int64_t, std::nano > chrono () const noexcept
 
int64_t days () const noexcept
 
int64_t hours () const noexcept
 
int64_t minutes () const noexcept
 
int64_t seconds () const noexcept
 
int64_t milliseconds () const noexcept
 
int64_t microseconds () const noexcept
 
int64_t nanoseconds () const noexcept
 
int64_t total () const noexcept
 
void swap (Timespan &timespan) noexcept
 

Static Public Member Functions

template<class Rep , class Period >
static Timespan chrono (const std::chrono::duration< Rep, Period > &duration) noexcept
 
static Timespan days (int64_t days) noexcept
 
static Timespan hours (int64_t hours) noexcept
 
static Timespan minutes (int64_t minutes) noexcept
 
static Timespan seconds (int64_t seconds) noexcept
 
static Timespan milliseconds (int64_t milliseconds) noexcept
 
static Timespan microseconds (int64_t microseconds) noexcept
 
static Timespan nanoseconds (int64_t nanoseconds) noexcept
 
static Timespan zero () noexcept
 

Friends

Timespan operator+ (const Timespan &timespan, int64_t offset) noexcept
 
Timespan operator+ (int64_t offset, const Timespan &timespan) noexcept
 
Timespan operator+ (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
Timespan operator- (const Timespan &timespan, int64_t offset) noexcept
 
Timespan operator- (int64_t offset, const Timespan &timespan) noexcept
 
Timespan operator- (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
bool operator== (const Timespan &timespan, int64_t offset) noexcept
 
bool operator== (int64_t offset, const Timespan &timespan) noexcept
 
bool operator== (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
bool operator!= (const Timespan &timespan, int64_t offset) noexcept
 
bool operator!= (int64_t offset, const Timespan &timespan) noexcept
 
bool operator!= (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
bool operator> (const Timespan &timespan, int64_t offset) noexcept
 
bool operator> (int64_t offset, const Timespan &timespan) noexcept
 
bool operator> (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
bool operator< (const Timespan &timespan, int64_t offset) noexcept
 
bool operator< (int64_t offset, const Timespan &timespan) noexcept
 
bool operator< (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
bool operator>= (const Timespan &timespan, int64_t offset) noexcept
 
bool operator>= (int64_t offset, const Timespan &timespan) noexcept
 
bool operator>= (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
bool operator<= (const Timespan &timespan, int64_t offset) noexcept
 
bool operator<= (int64_t offset, const Timespan &timespan) noexcept
 
bool operator<= (const Timespan &timespan1, const Timespan &timespan2) noexcept
 
void swap (Timespan &timespan1, Timespan &timespan2) noexcept