Go to the documentation of this file.
46 value_(std::chrono::high_resolution_clock::now().time_since_epoch())
60 value_ = value_type::zero();
66 value_ = std::chrono::high_resolution_clock::now().time_since_epoch();
72 return std::chrono::duration_cast<std::chrono::seconds>(value_).count();
84 return static_cast<double>(this->elapsed());
90 inline Foam::clockValue::operator double()
const
94 (
double(value_.count()) * value_type::period::num)
95 / value_type::period::den
102 value_ -= rhs.value_;
109 value_ += rhs.value_;
long seconds() const
The value in seconds (rounded)
double elapsedTime() const
The time elapsed [seconds] until now() since the start point.
clockValue & operator-=(const clockValue &rhs)
Subtract clock value.
clockValue elapsed() const
The time duration elapsed until now() since the start point.
clockValue()
Construct zero initialized.
void update()
Update to the current now() time from the system.
Access to high-resolution clock value with some basic operations. Used to calculate time durations,...
void clear()
Reset to zero.
clockValue & operator+=(const clockValue &rhs)
Add clock value.
static clockValue now()
The current clock value from the system.
std::chrono::high_resolution_clock::duration value_type
Time structure used.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...