make curr_CPU_time() broadly available rather than just isolated to ZAM

This commit is contained in:
Vern Paxson 2022-05-03 10:38:32 -07:00
parent aa5a5b2136
commit 41aee03c17
3 changed files with 14 additions and 11 deletions

View file

@ -424,6 +424,9 @@ extern struct timeval double_to_timeval(double t);
// Return > 0 if tv_a > tv_b, 0 if equal, < 0 if tv_a < tv_b.
extern int time_compare(struct timeval* tv_a, struct timeval* tv_b);
// Returns the CPU time consumed to date.
extern double curr_CPU_time();
// Returns an integer that's very likely to be unique, even across Zeek
// instances. The integer can be drawn from different pools, which is helpful
// when the random number generator is seeded to be deterministic. In that