OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
Time Class Reference

#include <Time.h>

Public Member Functions

 Time ()=default
 
 Time (int seconds, int minutes, int hours=0, int days=0, int weeks=0, int months=0, int years=0)
 
Duration toDurationSinceSilence () const
 
int64_t ticks () const
 
int64_t toSeconds () const
 
int64_t toMinutes () const
 
int64_t toHours () const
 
int toDays () const
 
int toWeeks () const
 
int toMonths () const
 
int toYears () const
 
CivilTime toCivilTime () const
 
void SetExpired ()
 
bool Expired () const
 
bool isValid () const
 
Timeoperator+= (Duration rhs)
 
Timeoperator-= (Duration rhs)
 
 operator bool () const
 

Static Public Member Functions

static Time fromDurationSinceSilence (Duration duration)
 
static Time fromTicks (int64_t ticks)
 
static Time fromSeconds (int seconds)
 
static Time fromMinutes (int minutes)
 
static Time fromHours (int hours)
 
static Time fromDays (int days)
 
static Time fromMonths (int months)
 
static Time fromYears (int years)
 

Private Attributes

int64_t _ticks = 0
 

Friends

bool operator== (Time l, Time r)=default
 
auto operator<=> (Time l, Time r)=default
 

Constructor & Destructor Documentation

◆ Time() [1/2]

Time::Time ( )
default

◆ Time() [2/2]

Time::Time ( int  seconds,
int  minutes,
int  hours = 0,
int  days = 0,
int  weeks = 0,
int  months = 0,
int  years = 0 
)
inline

Member Function Documentation

◆ Expired()

bool Time::Expired ( ) const
inline

◆ fromDays()

static Time Time::fromDays ( int  days)
inlinestatic

◆ fromDurationSinceSilence()

static Time Time::fromDurationSinceSilence ( Duration  duration)
inlinestatic

◆ fromHours()

static Time Time::fromHours ( int  hours)
inlinestatic

◆ fromMinutes()

static Time Time::fromMinutes ( int  minutes)
inlinestatic

◆ fromMonths()

static Time Time::fromMonths ( int  months)
inlinestatic

◆ fromSeconds()

static Time Time::fromSeconds ( int  seconds)
inlinestatic

◆ fromTicks()

static Time Time::fromTicks ( int64_t  ticks)
inlinestatic

◆ fromYears()

static Time Time::fromYears ( int  years)
inlinestatic

◆ isValid()

bool Time::isValid ( ) const
inline

◆ operator bool()

Time::operator bool ( ) const
inlineexplicit

◆ operator+=()

Time & Time::operator+= ( Duration  rhs)
inline

◆ operator-=()

Time & Time::operator-= ( Duration  rhs)
inline

◆ SetExpired()

void Time::SetExpired ( )
inline

◆ ticks()

int64_t Time::ticks ( ) const
inline

◆ toCivilTime()

CivilTime Time::toCivilTime ( ) const
inline

◆ toDays()

int Time::toDays ( ) const
inline

◆ toDurationSinceSilence()

Duration Time::toDurationSinceSilence ( ) const
inline

◆ toHours()

int64_t Time::toHours ( ) const
inline

◆ toMinutes()

int64_t Time::toMinutes ( ) const
inline

◆ toMonths()

int Time::toMonths ( ) const
inline

◆ toSeconds()

int64_t Time::toSeconds ( ) const
inline

◆ toWeeks()

int Time::toWeeks ( ) const
inline

◆ toYears()

int Time::toYears ( ) const
inline

Friends And Related Function Documentation

◆ operator<=>

auto operator<=> ( Time  l,
Time  r 
)
friend

◆ operator==

bool operator== ( Time  l,
Time  r 
)
friend

Member Data Documentation

◆ _ticks

int64_t Time::_ticks = 0
private

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