#include #include #include #include #include #include #include #define SIGNO_RTTIMER SIGRTMIN #define GET_TIME0(a) get_time0(a, sizeof(a)) == NULL ? "error" : a inline char * get_time0(char *buf, size_t sz_buf); int inst_timer(void); void h_rt_timer(int signum, siginfo_t *si, void *sv); class Ti { public: int Start() { sigset_t sigset_timer; if (inst_timer() == -1) { return EXIT_FAILURE; } sigemptyset(&sigset_timer); while (1) { sigsuspend(&sigset_timer); } } int Check() { std::cout<<"Check"< RT timer expiration at %s\n", GET_TIME0(ts_now)); int check = s_ti->Check(); if (check == -1) { // Á¾·á } }