56 public:
Time(
const struct timeval &_tv);
60 public:
Time(
const struct timespec &_tv);
65 public:
Time(int32_t _sec, int32_t _nsec);
69 public:
Time(
double _time);
72 public:
virtual ~Time();
88 public:
void Set(int32_t _sec, int32_t _nsec);
92 public:
void Set(
double _seconds);
96 public:
double Double()
const;
100 public:
float Float()
const;
255 public:
bool operator ==(
const struct timeval &_tv)
const;
260 public:
bool operator ==(
const struct timespec &_tv)
const;
275 public:
bool operator!=(
const struct timeval &_tv)
const;
280 public:
bool operator!=(
const struct timespec &_tv)
const;
295 public:
bool operator<(
const struct timeval &_tv)
const;
300 public:
bool operator<(
const struct timespec &_tv)
const;
310 public:
bool operator<(
double _time)
const;
315 public:
bool operator<=(
const struct timeval &_tv)
const;
320 public:
bool operator<=(
const struct timespec &_tv)
const;
335 public:
bool operator>(
const struct timeval &_tv)
const;
340 public:
bool operator>(
const struct timespec &_tv)
const;
350 public:
bool operator>(
double _time)
const;
355 public:
bool operator>=(
const struct timeval &_tv)
const;
360 public:
bool operator>=(
const struct timespec &_tv)
const;
376 {
return _sec * 1e9;}
397 _out << _time.
sec <<
" " << _time.
nsec;
409 _in.setf(std::ios_base::skipws);
410 _in >> _time.
sec >> _time.
nsec;
421 private:
static Time wallTime;
424 private:
static std::string wallTimeISO;
428 private:
inline void Correct()
431 if (this->
sec > 0 && this->
nsec < 0)
433 int32_t n = abs(this->
nsec / 1e9) + 1;
435 this->
nsec += n * 1e9;
437 if (this->sec < 0 && this->
nsec > 0)
439 int32_t n = abs(this->
nsec / 1e9) + 1;
441 this->
nsec -= n * 1e9;
445 this->
sec += this->
nsec /
static_cast<int32_t
>(1e9);
446 this->
nsec = this->
nsec %
static_cast<int32_t
>(1e9);
448 private:
static struct timespec clockResolution;