ARTS 2.5.0 (git: 9ee3ac6c)
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)
 
 Time (const String &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 noexcept
 
bool operator< (const Time &t) const noexcept
 
bool operator== (const Time &t) const noexcept
 
bool operator!= (const Time &t) const noexcept
 
bool operator<= (const Time &t) const noexcept
 
bool operator> (const Time &t) const noexcept
 
bool operator>= (const Time &t) const noexcept
 
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
 
 operator Numeric () const
 

Private Attributes

std::chrono::system_clock::time_point mtime
 

Detailed Description

Class to handle time in ARTS.

Definition at line 41 of file artstime.h.

Member Typedef Documentation

◆ InternalTimeStep

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

Definition at line 46 of file artstime.h.

Constructor & Destructor Documentation

◆ Time() [1/4]

Time::Time ( )
inline

Definition at line 52 of file artstime.h.

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

◆ Time() [2/4]

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

Definition at line 53 of file artstime.h.

◆ Time() [3/4]

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

Definition at line 54 of file artstime.h.

◆ Time() [4/4]

Time::Time ( const String t)
explicit

Definition at line 32 of file artstime.cc.

Member Function Documentation

◆ Data()

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

Definition at line 58 of file artstime.h.

References mtime.

Referenced by timeSleep().

◆ EpochTime()

InternalTimeStep Time::EpochTime ( ) const
inline

Definition at line 65 of file artstime.h.

References mtime.

Referenced by next_even().

◆ operator Numeric()

Time::operator Numeric ( ) const
inlineexplicit

Definition at line 86 of file artstime.h.

References Seconds().

◆ operator!=()

bool Time::operator!= ( const Time t) const
inlinenoexcept

Definition at line 71 of file artstime.h.

References operator==().

◆ operator+()

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

Definition at line 77 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 75 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 78 of file artstime.h.

References Time().

◆ operator-() [2/2]

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

Definition at line 68 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 76 of file artstime.h.

References mtime.

◆ operator<()

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

Definition at line 69 of file artstime.h.

References mtime.

Referenced by operator<=().

◆ operator<=()

bool Time::operator<= ( const Time t) const
inlinenoexcept

Definition at line 72 of file artstime.h.

References operator<(), and operator==().

Referenced by operator>().

◆ operator==()

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

Definition at line 70 of file artstime.h.

References mtime.

Referenced by operator!=(), operator<=(), and operator>=().

◆ operator>()

bool Time::operator> ( const Time t) const
inlinenoexcept

Definition at line 73 of file artstime.h.

References operator<=().

Referenced by operator>=().

◆ operator>=()

bool Time::operator>= ( const Time t) const
inlinenoexcept

Definition at line 74 of file artstime.h.

References operator==(), and operator>().

◆ PartOfSecond()

Numeric Time::PartOfSecond ( ) const
inline

Definition at line 83 of file artstime.h.

References Seconds().

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

◆ Seconds() [1/2]

Numeric Time::Seconds ( ) const
inline

Definition at line 81 of file artstime.h.

References mtime.

Referenced by operator Numeric(), PartOfSecond(), time_sign(), and time_srcs().

◆ Seconds() [2/2]

void Time::Seconds ( Numeric  x)
inline

Definition at line 82 of file artstime.h.

References operator+=(), and Seconds().

Referenced by Seconds().

◆ seconds_into_day()

TimeStep Time::seconds_into_day ( ) const
inline

Definition at line 64 of file artstime.h.

References PartOfSecond(), and toStruct().

Referenced by main().

◆ toGMTStruct()

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

Definition at line 63 of file artstime.h.

References toTimeT().

Referenced by LocalTimeOffset().

◆ toStruct()

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

Definition at line 62 of file artstime.h.

References toTimeT().

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

◆ toTimeT()

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

Definition at line 61 of file artstime.h.

References mtime.

Referenced by toGMTStruct(), and toStruct().

◆ Version()

Index Time::Version ( ) const
inlinenoexcept

Definition at line 49 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 files: