?? seconds.cpp
字號:
#include <stdio.h>#include <signal.h>#include <sys/types.h>#include <unistd.h>int receivd_signal=0;void catch_ctrl_c(int signo){ printf("signo=%d\n",signo); receivd_signal=1;}void SetTimer(struct timeval t,void (*funt)()){ sigset_t newmask; struct sigaction action; action.sa_handler=funt; action.sa_flags=0; if(sigaction(SIGUSR1,&action,NULL)==-1) perror("can not SIGINT"); for(int i=0;i<7;i++) { printf("%d\n",i); sleep(1); raise(SIGUSR1); }}main(){}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -