49 public:
Time(
const struct timeval &_tv);
53 public:
Time(
const struct timespec &_tv);
58 public:
Time(int32_t _sec, int32_t _nsec);
62 public:
Time(
double _time);
65 public:
virtual ~Time();
77 public:
void Set(int32_t _sec, int32_t _nsec);
81 public:
void Set(
double _seconds);
85 public:
double Double()
const;
89 public:
float Float()
const;
231 public:
bool operator ==(
const struct timeval &tv)
const;
236 public:
bool operator ==(
const struct timespec &tv)
const;
251 public:
bool operator!=(
const struct timeval &tv)
const;
256 public:
bool operator!=(
const struct timespec &tv)
const;
271 public:
bool operator<(
const struct timeval &tv)
const;
276 public:
bool operator<(
const struct timespec &tv)
const;
286 public:
bool operator<(
double time)
const;
291 public:
bool operator<=(
const struct timeval &tv)
const;
296 public:
bool operator<=(
const struct timespec &tv)
const;
311 public:
bool operator>(
const struct timeval &tv)
const;
316 public:
bool operator>(
const struct timespec &tv)
const;
326 public:
bool operator>(
double time)
const;
331 public:
bool operator>=(
const struct timeval &tv)
const;
336 public:
bool operator>=(
const struct timespec &tv)
const;
352 {
return _sec * 1e-9;}
358 {
return _ms * 1e-6;}
364 {
return _ms * 1e-3;}
373 _out << _time.
sec <<
" " << _time.
nsec;
385 _in.setf(std::ios_base::skipws);
386 _in >> _time.
sec >> _time.
nsec;
397 private:
static Time wallTime;
401 private:
inline void Correct()
404 while (this->
sec > 0 && this->
nsec < 0)
409 while (this->sec < 0 && this->
nsec > 0)
416 this->
sec += this->
nsec /
static_cast<int32_t
>(1e9);
417 this->
nsec = this->
nsec %
static_cast<int32_t
>(1e9);
419 private:
static struct timespec clock_resolution;