OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::TimeType< T >::Duration Class Reference

#include <time.hpp>

Public Member Functions

 Duration () noexcept
 
bool defined () const
 
bool operator! () const
 
bool is_infinite () const
 
bool enabled () const
 
void set_infinite ()
 
void set_zero ()
 
Duration operator+ (const Duration &d) const
 
Duration operator+ (const int delta) const
 
Duration operator* (const unsigned int mult) const
 
Durationoperator+= (const Duration &d)
 
void min (const Duration &d)
 
void max (const Duration &d)
 
Duration operator- (const Duration &d) const
 
Durationoperator-= (const Duration &d)
 
to_seconds () const
 
to_binary_ms () const
 
to_milliseconds () const
 
double to_double () const
 
raw () const
 

Static Public Member Functions

static Duration seconds (const T v)
 
static Duration binary_ms (const T v)
 
static Duration infinite ()
 
static Duration milliseconds (const T v)
 
static Duration milliseconds (std::chrono::milliseconds ms)
 

Private Member Functions

 Duration (const T duration)
 

Private Attributes

duration_
 

Friends

class TimeType
 

Detailed Description

template<typename T>
class openvpn::TimeType< T >::Duration

Definition at line 67 of file time.hpp.

Constructor & Destructor Documentation

◆ Duration() [1/2]

template<typename T >
openvpn::TimeType< T >::Duration::Duration ( )
inlinenoexcept

Definition at line 98 of file time.hpp.

Here is the caller graph for this function:

◆ Duration() [2/2]

template<typename T >
openvpn::TimeType< T >::Duration::Duration ( const T  duration)
inlineexplicitprivate

Definition at line 239 of file time.hpp.

Member Function Documentation

◆ binary_ms()

template<typename T >
static Duration openvpn::TimeType< T >::Duration::binary_ms ( const T  v)
inlinestatic

Definition at line 76 of file time.hpp.

◆ defined()

template<typename T >
bool openvpn::TimeType< T >::Duration::defined ( ) const
inline

Definition at line 103 of file time.hpp.

Here is the caller graph for this function:

◆ enabled()

template<typename T >
bool openvpn::TimeType< T >::Duration::enabled ( ) const
inline

Definition at line 115 of file time.hpp.

◆ infinite()

template<typename T >
static Duration openvpn::TimeType< T >::Duration::infinite ( )
inlinestatic

Definition at line 80 of file time.hpp.

Here is the caller graph for this function:

◆ is_infinite()

template<typename T >
bool openvpn::TimeType< T >::Duration::is_infinite ( ) const
inline

Definition at line 111 of file time.hpp.

Here is the caller graph for this function:

◆ max()

template<typename T >
void openvpn::TimeType< T >::Duration::max ( const Duration d)
inline

Definition at line 174 of file time.hpp.

◆ milliseconds() [1/2]

template<typename T >
static Duration openvpn::TimeType< T >::Duration::milliseconds ( const T  v)
inlinestatic

Definition at line 85 of file time.hpp.

Here is the caller graph for this function:

◆ milliseconds() [2/2]

template<typename T >
static Duration openvpn::TimeType< T >::Duration::milliseconds ( std::chrono::milliseconds  ms)
inlinestatic

Definition at line 92 of file time.hpp.

◆ min()

template<typename T >
void openvpn::TimeType< T >::Duration::min ( const Duration d)
inline

Definition at line 168 of file time.hpp.

◆ operator!()

template<typename T >
bool openvpn::TimeType< T >::Duration::operator! ( ) const
inline

Definition at line 107 of file time.hpp.

◆ operator*()

template<typename T >
Duration openvpn::TimeType< T >::Duration::operator* ( const unsigned int  mult) const
inline

Definition at line 154 of file time.hpp.

◆ operator+() [1/2]

template<typename T >
Duration openvpn::TimeType< T >::Duration::operator+ ( const Duration d) const
inline

Definition at line 128 of file time.hpp.

◆ operator+() [2/2]

template<typename T >
Duration openvpn::TimeType< T >::Duration::operator+ ( const int  delta) const
inline

Definition at line 136 of file time.hpp.

◆ operator+=()

template<typename T >
Duration & openvpn::TimeType< T >::Duration::operator+= ( const Duration d)
inline

Definition at line 159 of file time.hpp.

◆ operator-()

template<typename T >
Duration openvpn::TimeType< T >::Duration::operator- ( const Duration d) const
inline

Definition at line 180 of file time.hpp.

◆ operator-=()

template<typename T >
Duration & openvpn::TimeType< T >::Duration::operator-= ( const Duration d)
inline

Definition at line 190 of file time.hpp.

◆ raw()

template<typename T >
T openvpn::TimeType< T >::Duration::raw ( ) const
inline

Definition at line 220 of file time.hpp.

◆ seconds()

template<typename T >
static Duration openvpn::TimeType< T >::Duration::seconds ( const T  v)
inlinestatic

Definition at line 72 of file time.hpp.

◆ set_infinite()

template<typename T >
void openvpn::TimeType< T >::Duration::set_infinite ( )
inline

Definition at line 119 of file time.hpp.

Here is the caller graph for this function:

◆ set_zero()

template<typename T >
void openvpn::TimeType< T >::Duration::set_zero ( )
inline

Definition at line 123 of file time.hpp.

Here is the caller graph for this function:

◆ to_binary_ms()

template<typename T >
T openvpn::TimeType< T >::Duration::to_binary_ms ( ) const
inline

Definition at line 203 of file time.hpp.

◆ to_double()

template<typename T >
double openvpn::TimeType< T >::Duration::to_double ( ) const
inline

Definition at line 215 of file time.hpp.

◆ to_milliseconds()

template<typename T >
T openvpn::TimeType< T >::Duration::to_milliseconds ( ) const
inline

Definition at line 208 of file time.hpp.

◆ to_seconds()

template<typename T >
T openvpn::TimeType< T >::Duration::to_seconds ( ) const
inline

Definition at line 199 of file time.hpp.

Friends And Related Symbol Documentation

◆ TimeType

template<typename T >
friend class TimeType
friend

Definition at line 69 of file time.hpp.

Member Data Documentation

◆ duration_

template<typename T >
T openvpn::TimeType< T >::Duration::duration_
private

Definition at line 244 of file time.hpp.


The documentation for this class was generated from the following file: