Macaulay2 Engine
Loading...
Searching...
No Matches
timing.hpp File Reference

Inline std::chrono::steady_clock wrappers and elapsed-time conversion helpers. More...

#include <chrono>

Go to the source code of this file.

Macros

#define TIME(t, call)

Functions

std::chrono::steady_clock::time_point timer ()
std::chrono::steady_clock::time_point now ()
template<typename DurationType>
long nanoseconds (DurationType time_diff)
template<typename DurationType>
long microseconds (DurationType time_diff)
template<typename DurationType>
double seconds (DurationType time_diff)

Detailed Description

Inline std::chrono::steady_clock wrappers and elapsed-time conversion helpers.

Note
AI-generated documentation. Verify against the source before relying on it.

Provides timer() / now() (both returning a std::chrono::steady_clock::time_point, hard-coded to the steady clock) for capturing high-resolution timestamps, plus templated nanoseconds(duration) / microseconds(duration) / seconds(duration) helpers that pull the count out of any std::chrono::duration-shaped type via duration_cast (seconds returns a double by scaling the nanosecond count). The TIME(t, call) macro at the bottom wraps a call with now() brackets and accumulates the nanosecond delta into t, which is how the GB and resolution drivers collect their clock_* timing fields.

Used by SLP-imp.hpp's NAG evaluator (per-step timestamps that drive continuation-step heuristics) and by the F4 GB engines for the per-reduction trace timings dumped on M2_gbTrace runs. The StopConditions machinery in comp.hpp does not have a time-limit field — its stop conditions are degree / basis-element / syzygy / pair / codim / subring / length limits only.

See also
SLP-imp.hpp

Definition in file timing.hpp.