FLINT3.7.0-dev

init_clock, init_all_clocks, start_clock, stop_clock, get_clock

Synopsis#include <flint/profiler.h>
void init_clock(int n)source
void init_all_clocks(void)source
void start_clock(int n)source
void stop_clock(int n)source
double get_clock(int n)source

Accumulating clocks numbered 0 \le n < FLINT_NUM_CLOCKS. init_clock(n) resets clock n to zero and init_all_clocks resets all of them. Each pair start_clock(n), stop_clock(n) adds the ticks elapsed between the two calls to clock n, and get_clock(n) returns the accumulated time in microseconds.

init_all_clocks();
start_clock(1);
/* code to time */
stop_clock(1);
flint_printf("%.3f us\n", get_clock(1));
Cite this page

The FLINT team, “init_clock, init_all_clocks, start_clock, stop_clock, get_clock (profiler.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/profiler/init_clock.html (generated 2026-10-20).