3 #define TIMEOUT_PUBLIC static
10 static void *init(struct timeout
*timeout
, size_t count
, int verbose
) {
15 T
= timeouts_open(TIMEOUT_mHZ
, &error
);
17 for (i
= 0; i
< count
; i
++) {
18 timeout_init(&timeout
[i
], 0);
22 timeout_debug
= verbose
;
29 static void add(void *T
, struct timeout
*to
, timeout_t expires
) {
30 timeouts_add(T
, to
, expires
);
34 static void del(void *T
, struct timeout
*to
) {
39 static struct timeout
*get(void *T
) {
40 return timeouts_get(T
);
44 static void update(void *T
, timeout_t ts
) {
45 timeouts_update(T
, ts
);
49 static void (check
)(void *T
) {
50 if (!timeouts_check(T
, stderr
))
55 static int empty(void *T
) {
56 return !(timeouts_pending(T
) || timeouts_expired(T
));
60 static struct timeout
*next(void *T
, struct timeouts_it
*it
) {
61 return timeouts_next(T
, it
);
65 static void destroy(void *T
) {
70 const struct benchops benchops
= {