#include #include #include #include #include #include #include int main(void) { struct sigevent sev; timer_t id; char buf[4096]; int fd; memset(&sev, 0, sizeof(struct sigevent)); sev.sigev_value.sival_int = SIGEV_SIGNAL; sev.sigev_value.sival_ptr = (void *)1UL; sev.sigev_signo = 1; sev.sigev_notify = 0x40000000; memset(&id, 0, sizeof(timer_t)); timer_create(CLOCK_MONOTONIC, &sev, &id); fd = open("/proc/self/timers", O_RDONLY); read(fd, buf, sizeof(buf)); return 0; }