forked from wahern/timeout
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbench.h
More file actions
54 lines (42 loc) · 692 Bytes
/
bench.h
File metadata and controls
54 lines (42 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
struct op {
enum {
OP_OOPS,
OP_QUIT,
OP_HELP,
OP_ADD,
OP_DEL,
OP_GET,
OP_STEP,
OP_UPDATE,
OP_CHECK,
OP_FILL,
OP_NONE,
} type;
union {
struct {
char why[32];
} oops;
struct {
unsigned id;
timeout_t timeout;
} add;
struct {
unsigned id;
} del;
struct {
int verbose;
} get;
struct {
timeout_t time;
} step, update;
};
}; /* struct op */
struct op *parseop(struct op *, char *ln);
struct vops {
void (*init)(struct timeout *, size_t, int);
void (*add)(struct timeout *, timeout_t);
void (*del)(struct timeout *);
struct timeout *(*get)(void);
void (*update)(timeout_t);
void (*check)(void);
}; /* struct vops() */