57 #define TF_LIBTIME_H_ "version V1.16" 122 operator time_kernel::time_Ts()
const;
123 operator std::string()
const;
190 std::string
timestring(
const std::string& format)
const;
274 Mtime_Ts(Itime_Ts) { }
298 inline TBaseClassTime::operator time_kernel::time_Ts()
const 299 {
return(Mtime_Ts); }
300 inline TBaseClassTime::operator std::string()
const {
return(timestring()); }
403 const int &minute,
const int &second,
404 const int &milsec,
const int &micsec):
492 time_kernel::time_Ts full;
499 time_kernel::time_Ts full, rest;
659 const char* condition);
664 const char* condition);
672 virtual void report()
const;
705 #define libtime_Xassert(C,M,E) \ 706 if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); } 714 #define libtime_assert(C,M) libtime_Xassert( C , M , libtime::Exception ) 722 #define libtime_abort(M) \ 723 throw( libtime::Exception ( M , __FILE__, __LINE__ )) 738 #endif // TF_LIBTIME_H_ Exception()
Creates exception with no explaining comments.
bool operator<=(const TRelativeTime &A) const
TAbsoluteTime begin() const
TRelativeTime & operator%=(const timeint &n)
TBaseClassTime(const std::string &Itimestring)
TAbsoluteTime(const std::string &Itimestring)
integer time_isleapyear(timeint year)
const char * Mcondition
pointer to assertion condition text string
const char * Mmessage
pointer to message string
void setdoy(const timeint &doy)
TRelativeTime & operator+=(const TRelativeTime &A)
void time_div(time_Ts Date1, time_Ts *Pdate2, timeint n, timeint *rest)
bool operator>(const TAbsoluteTime &A) const
TRelativeTime & operator*=(const timeint &n)
TRelativeTime operator/(const timeint &n) const
char * time_sprint(time_Ts Date)
static bool suppress_year
TAbsoluteTime end() const
double float_second() const
double time2double(const TRelativeTime &rtime)
convert relative time to seconds
Seconds(const timeint &second=1, const timeint &milsec=0, const timeint &micsec=0)
time_kernel::time_Ts Mtime_Ts
provide a convenient way to specify time intervals in the order of one hour
provide a convenient way to specify time intervals in the order of one microsecond ...
TRelativeTime double2time(const double &seconds)
convert seconds to relative time
void nfit(const TRelativeTime &delta, timeint &n, TRelativeTime &full) const
TAbsoluteTime utc()
return system time in UTC
Milliseconds(const timeint &milsec=1, const timeint &micsec=0)
Minutes(const double &minutes)
provide a convenient way to specify time intervals in the order of one day
TAbsoluteTime & operator-=(const TRelativeTime &A)
TAbsoluteTime & operator=(const time_kernel::time_Ts &A)
void time_add(time_Ts Date1, time_Ts Date2, time_Ts *Pdate3)
TRelativeTime(const std::string &Itimestring)
class to contain relative times
TRelativeTime & operator-=(const TRelativeTime &A)
Minutes(const timeint &minute=1, const timeint &second=0, const timeint &milsec=0, const timeint &micsec=0)
static void report_on_construct()
Issue a screen report on construction of exception.
bool operator!=(const TAbsoluteTime &A) const
Microseconds(const double µseconds)
Days(const timeint &day=1, const timeint &hour=0, const timeint &minute=0, const timeint &second=0, const timeint &milsec=0, const timeint &micsec=0)
void dump(std::ostream &os, const TBaseClassTime &t)
dump internal representation of time (for debugging purposes)
virtual ~Exception()
provide explicit virtual destructor
void time_getdate(timeint *day, timeint *month, time_Ts Date)
TRange largestcommon(const TRange &) const
find largest range spanned by both
TAbsoluteTime operator+(const TRelativeTime &A) const
const char * Mfile
pointer to file name string
std::string timestring() const
bool operator>=(const TRelativeTime &A) const
TRange & advance(const TRelativeTime &)
advance this range by dt
TRange advancedby(const TRelativeTime &) const
return a range advanced by dt
const int & Mline
pointer to line number in source file
Hours(const double &hours)
TRelativeTime operator%(const timeint &n) const
provide a convenient way to specify time intervals in the order of one minute
void time_setdoy(timeint day, timeint month, time_Ts *Pdate)
void time_clear(time_Ts *Pdate)
bool operator>=(const TAbsoluteTime &A) const
void expand(const TRange &)
set to largest range spanned by both
void div(const timeint &n, TRelativeTime &frac, timeint &rest) const
TRelativeTime size() const
TRelativeTime operator-(const TRelativeTime &A) const
void time_norm(time_Ts *Pdate)
void time_fullyear(timeint *year)
Hours(const timeint &hour=1, const timeint &minute=0, const timeint &second=0, const timeint &milsec=0, const timeint &micsec=0)
void setdate(const timeint &day, const timeint &month)
std::string hierarchicalstring() const
bool operator<(const TRelativeTime &A) const
bool operator!=(const TRelativeTime &A) const
const char usage_time_format_string[]
print information on time format
Seconds(const double &seconds)
static void dont_report_on_construct()
Issue NO screen report on construction of exception.
void char_read(const char *timestring)
TRelativeTime & operator/=(const timeint &n)
static bool Mreport_on_construct
Shall we print to cerr at construction time?
static bool suppress_normal
bool operator<=(const TAbsoluteTime &A) const
TRelativeTime operator*(const time_kernel::timeint &n, const TRelativeTime &A)
bool overlaps(const TRange &) const
true if other range overlaps this one
void time_sub(time_Ts Date1, time_Ts Date2, time_Ts *Pdate3)
TAbsoluteTime operator-(const TRelativeTime &A) const
TRelativeTime operator*(const timeint &n) const
TRange & delay(const TRelativeTime &)
delay this range by dt
bool operator==(const TAbsoluteTime &A) const
TAbsoluteTime & operator+=(const TRelativeTime &A)
void time_nfit(time_Ts Date1, time_Ts Date2, timeint *n, time_Ts *Pfull)
void getdate(timeint &day, timeint &month) const
void base_report() const
Screen report.
bool operator<(const TAbsoluteTime &A) const
void time_mul(time_Ts Date1, time_Ts *Pdate2, integer n)
TRelativeTime operator+(const TRelativeTime &A) const
void shrink(const TRange &)
set to smallest range common to both
provide a convenient way to specify time intervals in the order of one millisecond ...
bool includes(const TAbsoluteTime &) const
true if date is within range
TRange delayedby(const TRelativeTime &) const
return a range delayed by dt
bool operator==(const TRelativeTime &A) const
TAbsoluteTime now()
return system time
void string_read(const std::string ×tring)
provide a convenient way to specify time intervals in the order of one second
void time_finish(time_Ts *Pdate)
class to contain absolute times
Microseconds(const timeint &micsec=1)
virtual void report() const
Screen report.
Milliseconds(const double &milliseconds)
integer time_compare(time_Ts Date1, time_Ts Date2)
TRange smallestcommon(const TRange &) const
find largest range common to both
std::string hierarchicalstring() const
TRelativeTime & operator=(const time_kernel::time_Ts &A)
bool operator>(const TRelativeTime &A) const