10 #include <sys/types.h>
26 struct event *ev[NEVENT];
32 return (
int)(rand() *
n);
34 return (
int)(random() %
n);
39 time_cb(
int fd,
short event,
void *arg)
46 if (called < 10*NEVENT) {
47 for (i = 0; i < 10; i++) {
50 tv.tv_usec = rand_int(50000);
60 main (
int argc,
char **argv)
68 for (i = 0; i < NEVENT; i++) {
69 ev[
i] = malloc(
sizeof(
struct event));
74 tv.tv_usec = rand_int(50000);
80 return (called < NEVENT);