94 return static_cast<int>(p);
97 using ClockType = std::chrono::high_resolution_clock;
112 return ClockType::now();
Core header for the Aleph-w library.
Class Now is a practical class for timing based in a high resolution clock.
ClockType::time_point TimePointType
static double compute_time_diff(const TimePointType &rtp, const TimePointType <p, const Precision &precision)
Calculates the time that has elapsed between two time points.
TimePointType start()
Sets internally the current time point.
std::chrono::high_resolution_clock ClockType
static const double precision_values[]
const Precision & get_precision() const
Gets the type of precision.
double delta()
Like elapsed().
static int to_int(Precision p)
Precision
Precision for timing.
void set_precision(const Precision &_precision)
Sets the type of precision.
Now(bool start_now=false)
Builds a new object with default values.
ClockType::duration DurationType
static TimePointType current_time_point()
Gets the current time point.
Now(const Precision &_precision, bool start_now=false)
Builds a new object with parametric precision time.
static double delta(const TimePointType &tp, const Precision &precision=Precision::Milliseconds)
Like elapsed(const TimePointType & tp, const Precision & precision = MILLISECONDS).
double elapsed()
Calculates the time that has elapsed since the last time start(), elapsed() or delta() was called.
static double elapsed(const TimePointType &tp, const Precision &precision=Precision::Milliseconds)
Calculates the time that has elapsed since a given time point.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.