ARTS  2.4.0(git:4fb77825)
Time Class Reference

Class to handle time in ARTS. More...

#include <artstime.h>

Public Types

using InternalTimeStep = decltype(mtime)::duration
 

Public Member Functions

Index Version () const noexcept
 
 Time ()
 
 Time (std::time_t t)
 
 Time (std::tm t)
 
const std::chrono::system_clock::time_point & Data () const
 
std::time_t toTimeT () const
 
std::tm toStruct () const
 
std::tm toGMTStruct () const
 
TimeStep seconds_into_day () const
 
InternalTimeStep EpochTime () const
 
InternalTimeStep operator- (const Time &t) const
 
bool operator< (const Time &t) const
 
bool operator== (const Time &t) const
 
template<typename T , typename R >
Timeoperator+= (const std::chrono::duration< T, R > &dt)
 
template<typename T , typename R >
Timeoperator-= (const std::chrono::duration< T, R > &dt)
 
template<typename T , typename R >
Time operator+ (const std::chrono::duration< T, R > &dt) const
 
template<typename T , typename R >
Time operator- (const std::chrono::duration< T, R > &dt) const
 
Numeric Seconds () const
 
void Seconds (Numeric x)
 
Numeric PartOfSecond () const
 

Private Attributes

std::chrono::system_clock::time_point mtime
 

Detailed Description

Class to handle time in ARTS.

Definition at line 40 of file artstime.h.

Member Typedef Documentation

◆ InternalTimeStep

using Time::InternalTimeStep = decltype(mtime)::duration

Definition at line 45 of file artstime.h.

Constructor & Destructor Documentation

◆ Time() [1/3]

Time::Time ( )
inline

Definition at line 51 of file artstime.h.

Referenced by operator+(), and operator-().

◆ Time() [2/3]

Time::Time ( std::time_t  t)
inlineexplicit

Definition at line 52 of file artstime.h.

◆ Time() [3/3]

Time::Time ( std::tm  t)
inlineexplicit

Definition at line 53 of file artstime.h.

Member Function Documentation

◆ Data()

const std::chrono::system_clock::time_point& Time::Data ( ) const
inline

Definition at line 56 of file artstime.h.

References mtime.

◆ EpochTime()

InternalTimeStep Time::EpochTime ( ) const
inline

Definition at line 63 of file artstime.h.

References mtime.

Referenced by next_even().

◆ operator+()

template<typename T , typename R >
Time Time::operator+ ( const std::chrono::duration< T, R > &  dt) const
inline

Definition at line 71 of file artstime.h.

References Time().

◆ operator+=()

template<typename T , typename R >
Time& Time::operator+= ( const std::chrono::duration< T, R > &  dt)
inline

Definition at line 69 of file artstime.h.

References mtime.

Referenced by Seconds().

◆ operator-() [1/2]

template<typename T , typename R >
Time Time::operator- ( const std::chrono::duration< T, R > &  dt) const
inline

Definition at line 72 of file artstime.h.

References Time().

◆ operator-() [2/2]

InternalTimeStep Time::operator- ( const Time t) const
inline

Definition at line 66 of file artstime.h.

References mtime.

◆ operator-=()

template<typename T , typename R >
Time& Time::operator-= ( const std::chrono::duration< T, R > &  dt)
inline

Definition at line 70 of file artstime.h.

References mtime.

◆ operator<()

bool Time::operator< ( const Time t) const
inline

Definition at line 67 of file artstime.h.

References mtime.

◆ operator==()

bool Time::operator== ( const Time t) const
inline

Definition at line 68 of file artstime.h.

References mtime.

◆ PartOfSecond()

Numeric Time::PartOfSecond ( ) const
inline

Definition at line 77 of file artstime.h.

References Seconds().

Referenced by operator<<(), and seconds_into_day().

◆ Seconds() [1/2]

Numeric Time::Seconds ( ) const
inline

Definition at line 75 of file artstime.h.

References mtime.

Referenced by PartOfSecond().

◆ Seconds() [2/2]

void Time::Seconds ( Numeric  x)
inline

Definition at line 76 of file artstime.h.

References operator+=(), Seconds(), and ARTS::Var::x().

Referenced by Seconds().

◆ seconds_into_day()

TimeStep Time::seconds_into_day ( ) const
inline

Definition at line 62 of file artstime.h.

References PartOfSecond(), toStruct(), and ARTS::Var::x().

◆ toGMTStruct()

std::tm Time::toGMTStruct ( ) const
inline

Definition at line 61 of file artstime.h.

References toTimeT(), ARTS::Var::x(), and ARTS::Var::y().

◆ toStruct()

std::tm Time::toStruct ( ) const
inline

Definition at line 60 of file artstime.h.

References toTimeT(), ARTS::Var::x(), and ARTS::Var::y().

Referenced by operator<<(), and seconds_into_day().

◆ toTimeT()

std::time_t Time::toTimeT ( ) const
inline

Definition at line 59 of file artstime.h.

References mtime.

Referenced by toGMTStruct(), and toStruct().

◆ Version()

Index Time::Version ( ) const
inlinenoexcept

Definition at line 48 of file artstime.h.

Referenced by xml_write_to_stream().

Member Data Documentation

◆ mtime

std::chrono::system_clock::time_point Time::mtime
private

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