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());
90inline 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_;
Access to high-resolution clock value with some basic operations. Used to calculate time durations,...
long seconds() const
The value in seconds (rounded).
const value_type & value() const noexcept
The time duration.
std::chrono::high_resolution_clock::duration value_type
Time structure used.
clockValue()
Construct zero initialized.
clockValue & operator+=(const clockValue &rhs)
Add clock value.
static clockValue now()
The current clock value from the system.
clockValue & operator-=(const clockValue &rhs)
Subtract clock value.
void update()
Update to the current now() time from the system.
clockValue elapsed() const
The time duration elapsed until now() since the start point.
void clear()
Reset to zero.
double elapsedTime() const
The time elapsed [seconds] until now() since the start point.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)