インターバルタイマーのPOSIXタイマー版です。前述のSIGALRMを使用したインターバルタイマーと同じく10ms毎に設定したシグナル(今回はリアルタイムシグナルであるSIG35)を通知し周期を刻みます。 /* * sample program * POSIX interval timer */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <signal.h> #include <string.h> #include <time.h> #include <unistd.h> #include <errno.h> void SignalHandler(int, siginfo_t*, void*); int _nanosleep(int, int); int main(void) { struct