mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-12 10:06:58 +02:00
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.
11 lines
299 B
C
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 */
|