haproxy/include/haproxy/time-t.h
Amaury Denoyelle a6e2523ca1 MINOR: time: define tot_time structure
Define a new utility type tot_time. Its purpose is to be able to account
elapsed time accross multiple periods. Functions are defined to easily
start and stop measures, and return the current value.
2024-08-07 15:40:52 +02:00

11 lines
299 B
C

#ifndef _HAPROXY_TIME_T_H
#define _HAPROXY_TIME_T_H
/* Type used to account a total time over distinct periods. */
struct tot_time {
uint32_t curr; /* timestamp of start date or 0 if timer stopped */
uint32_t tot; /* total already accounted since last stop */
};
#endif /* _HAPROXY_TIME_T_H */