opendnp3  3.1.0
Reference implementation of DNP3 (IEEE-1815)
opendnp3::TimeDuration Class Reference

Strong typing for millisecond based time durations. More...

#include <opendnp3/util/TimeDuration.h>

Public Member Functions

 TimeDuration ()
 
TimeDuration Double () const
 
bool IsNegative () const
 
bool operator< (const TimeDuration &other) const
 
bool operator<= (const TimeDuration &other) const
 
bool operator== (const TimeDuration &other) const
 
bool operator> (const TimeDuration &other) const
 
bool operator>= (const TimeDuration &other) const
 
std::string ToString () const
 

Static Public Member Functions

static TimeDuration Max ()
 
static TimeDuration Milliseconds (int64_t milliseconds)
 
static TimeDuration Min ()
 
static TimeDuration Minutes (int64_t minutes)
 
static TimeDuration Seconds (int64_t seconds)
 
static TimeDuration Zero ()
 

Public Attributes

std::chrono::steady_clock::duration value
 

Private Member Functions

 TimeDuration (std::chrono::steady_clock::duration value)
 

Static Private Member Functions

template<class T >
static TimeDuration FromValue (int64_t value)
 

Friends

class Timestamp
 

Detailed Description

Strong typing for millisecond based time durations.

Definition at line 33 of file TimeDuration.h.

Constructor & Destructor Documentation

◆ TimeDuration() [1/2]

opendnp3::TimeDuration::TimeDuration ( )

◆ TimeDuration() [2/2]

opendnp3::TimeDuration::TimeDuration ( std::chrono::steady_clock::duration  value)
explicitprivate

Member Function Documentation

◆ Double()

TimeDuration opendnp3::TimeDuration::Double ( ) const

◆ FromValue()

template<class T >
static TimeDuration opendnp3::TimeDuration::FromValue ( int64_t  value)
staticprivate

◆ IsNegative()

bool opendnp3::TimeDuration::IsNegative ( ) const

◆ Max()

static TimeDuration opendnp3::TimeDuration::Max ( )
static

◆ Milliseconds()

static TimeDuration opendnp3::TimeDuration::Milliseconds ( int64_t  milliseconds)
static

◆ Min()

static TimeDuration opendnp3::TimeDuration::Min ( )
static

◆ Minutes()

static TimeDuration opendnp3::TimeDuration::Minutes ( int64_t  minutes)
static

◆ operator<()

bool opendnp3::TimeDuration::operator< ( const TimeDuration other) const

◆ operator<=()

bool opendnp3::TimeDuration::operator<= ( const TimeDuration other) const

◆ operator==()

bool opendnp3::TimeDuration::operator== ( const TimeDuration other) const

◆ operator>()

bool opendnp3::TimeDuration::operator> ( const TimeDuration other) const

◆ operator>=()

bool opendnp3::TimeDuration::operator>= ( const TimeDuration other) const

◆ Seconds()

static TimeDuration opendnp3::TimeDuration::Seconds ( int64_t  seconds)
static

◆ ToString()

std::string opendnp3::TimeDuration::ToString ( ) const

◆ Zero()

static TimeDuration opendnp3::TimeDuration::Zero ( )
static

Friends And Related Function Documentation

◆ Timestamp

friend class Timestamp
friend

Definition at line 35 of file TimeDuration.h.

Member Data Documentation

◆ value

std::chrono::steady_clock::duration opendnp3::TimeDuration::value

Definition at line 64 of file TimeDuration.h.


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