Time

Use abmt::time::now() to get current time. This method can be overwritten by the runtime.

time

Nameabmt::time
Header#include <abmt/time.h>

Attributes

volatile int64_t ns_since_1970

Methods

time(int64_t ns=0)
time(std::chrono::duration< T > d)
time(std::chrono::duration< T, U > d)
int64_t ns()
int64_t us()
int64_t ms()
int64_t sec()
int64_t min()
int64_t hour()
int64_t day()
int64_t week()
int64_t year()
double sec2()
time delta_to_now()
time now()[static] must be defined in runtime.
time ns(int64_t t)[static]
time us(int64_t t)[static]
time ms(int64_t t)[static]
time sec(int64_t t)[static]
time min(int64_t t)[static]
time hour(int64_t t)[static]
time day(int64_t t)[static]
time week(int64_t t)[static]
time year(int64_t t)[static]

Operators

bool operator==(const time& t)
bool operator!=(const time& t)
bool operator<(const time& t)
bool operator>(const time& t)
bool operator<=(const time& t)
bool operator>=(const time& t)
time& operator+=(const time& t)
time& operator-=(const time& t)
time& operator*=(const time& t)
time& operator/=(const time& t)
time operator+(const time& t) const
time operator-(const time& t) const
time operator*(const time& t) const
time operator/(const time& t) const
time operator*(const T& n) const
time operator/(const T& n)

date

Nameabmt::date
Header#include <abmt/time.h>

Attributes

size_t year
size_t month
size_t day
size_t hour
size_t min
float sec

Methods

date(time t=abmt::time::now())
bool is_zero()
date zero()[static]

Operators

operator time()

Date:

struct date{
    size_t year;
    size_t month;
    size_t day;
    size_t hour;
    size_t min;
    float  sec;

    date(time t = abmt::time::now());
    static date zero();
    operator time();
    bool is_zero();
};
Impressum