]>
git.saurik.com Git - apple/launchd.git/blob - launchd/testing/EVFILT_TIMER.c
15 time_t later
= time(NULL
);
25 EV_SET(&kev
, n
* 100000, EVFILT_TIMER
, EV_ADD
, NOTE_SECONDS
| NOTE_ABSOLUTE
, now_plus_n(n
), (void *)n
);
27 assert(kevent(kq
, &kev
, 1, NULL
, 0, NULL
) == 0);
35 assert((kq
= kqueue()) != -1);
44 assert(kevent(kq
, NULL
, 0, &kev
, 1, NULL
) == 1);
45 fprintf(stdout
, "kev.ident == %ld kev.udata == %p\n", kev
.ident
, kev
.udata
);
46 add_abs_timer((int)kev
.udata
);