Go to the documentation of this file.
38 value_(value_type::
zero())
50 value_(value_type::
zero())
63 value_ = value_type::zero();
69 value_ = std::chrono::high_resolution_clock::now().time_since_epoch();
75 return (now() -= *
this);
81 return std::chrono::duration_cast<std::chrono::seconds>(value_).count();
87 std::ostringstream os;
90 const unsigned long ss =
91 std::chrono::duration_cast<std::chrono::seconds>(value_).count();
94 const auto dd = (ss / 86400);
97 const int hh = ((ss / 3600) % 24);
99 if (dd) os << dd <<
'-';
109 << ((ss / 60) % 60) <<
':';
118 std::chrono::duration_cast<std::chrono::milliseconds>(value_).count()
133 Foam::clockValue::operator double ()
const
137 (
double(value_.count()) * value_type::period::num)
138 / value_type::period::den
145 value_ -= rhs.value_;
152 value_ += rhs.value_;
long seconds() const
The value in seconds (rounded)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
clockValue & operator-=(const clockValue &rhs)
Subtract time value.
const Type & value() const
Return const reference to value.
clockValue elapsed() const
The time elapsed from now() since the start time.
clockValue()
Construct zero initialized.
const value_type & value() const
Return the value.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
void update()
Update to the current now() time from the system.
std::string str() const
Format as day-hh:mm:ss string.
Access to high-resolution clock value with some basic operations.
Omanip< int > setw(const int i)
void clear()
Reset to zero.
Omanip< char > setfill(char fillch)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
clockValue & operator+=(const clockValue &rhs)
Add time value.
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...