4 #ifndef DUNE_PDELAB_COMMON_CLOCK_HH
5 #define DUNE_PDELAB_COMMON_CLOCK_HH
11 #include <dune/common/exceptions.hh>
29 if(tv_nsec >= 1000000000L) {
31 tv_nsec -= 1000000000L;
45 tv_nsec += 1000000000L;
58 std::ostream &
operator<<(std::ostream &
s,
const TimeSpec &t);
81 #endif // DUNE_PDELAB_COMMON_CLOCK_HH
long tv_nsec
nanoseconds part
Definition: clock.hh:24
exception thrown by clock functions
Definition: clock.hh:61
TimeSpec getProcessTimeResolution()
get resolution of the process time in seconds
Definition: clock.cc:214
const std::string & getProcessTimeImp()
return a string describing which implementation is used to get the process time
Definition: clock.cc:216
TimeSpec getProcessTime()
get the process time in seconds used by the current process
Definition: clock.cc:213
TimeSpec getWallTime()
get the wall time in seconds since the epoch
Definition: clock.cc:125
TimeSpec & operator-=(const TimeSpec &o)
Definition: clock.hh:40
Base class for all PDELab exceptions.
Definition: exceptions.hh:17
struct to store temporal values
Definition: clock.hh:17
Definition: adaptivity.hh:27
time_t tv_sec
seconds part
Definition: clock.hh:19
TimeSpec operator-(const TimeSpec &o) const
Definition: clock.hh:49
const std::string s
Definition: function.hh:1102
TimeSpec & operator+=(const TimeSpec &o)
Definition: clock.hh:26
TimeSpec operator+(const TimeSpec &o) const
Definition: clock.hh:35
const std::string & getWallTimeImp()
return a string describing which implementation is used to get the wall time
Definition: clock.cc:128
TimeSpec getWallTimeResolution()
get resolution of the wall time in seconds
Definition: clock.cc:126
std::ostream & operator<<(std::ostream &s, const TimeSpec &t)
insert a timespec into an output stream
Definition: clock.cc:39