timevar: document in the header, not in the implementation

* lib/timevar.c: Move documentation from here...
* lib/timevar.h: to there.
This commit is contained in:
Akim Demaille
2018-09-22 10:26:33 +02:00
parent ab3ec56ffe
commit 889dea0275
2 changed files with 34 additions and 29 deletions

View File

@@ -75,12 +75,46 @@ typedef enum
timevar_id_t;
#undef DEFTIMEVAR
/* Initialize timing variables. */
void timevar_init (void);
/* Push TIMEVAR onto the timing stack. No further elapsed time is
attributed to the previous topmost timing variable on the stack;
subsequent elapsed time is attributed to TIMEVAR, until it is
popped or another element is pushed on top.
TIMEVAR cannot be running as a standalone timer. */
void timevar_push (timevar_id_t);
/* Pop the topmost timing variable element off the timing stack. The
popped variable must be TIMEVAR. Elapsed time since the that
element was pushed on, or since it was last exposed on top of the
stack when the element above it was popped off, is credited to that
timing variable. */
void timevar_pop (timevar_id_t);
/* Start timing TIMEVAR independently of the timing stack. Elapsed
time until timevar_stop is called for the same timing variable is
attributed to TIMEVAR. */
void timevar_start (timevar_id_t);
/* Stop timing TIMEVAR. Time elapsed since timevar_start was called
is attributed to it. */
void timevar_stop (timevar_id_t);
/* Fill the elapsed time for TIMEVAR into ELAPSED. Returns
update-to-date information even if TIMEVAR is currently running. */
void timevar_get (timevar_id_t, struct timevar_time_def *);
/* Summarize timing variables to FP. The timing variable TV_TOTAL has
a special meaning -- it's considered to be the total elapsed time,
for normalizing the others, and is displayed last. */
void timevar_print (FILE *);
extern int timevar_report;