Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Commit 52a709b

Browse files
remove useless code
1 parent aee5815 commit 52a709b

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

test/test.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55

66
#include "cxxitimer.hpp"
77

8-
#include <csignal>
9-
#include <cstring>
108
#include <iostream>
11-
#include <sysexits.h>
9+
#include <signal.h>
1210
#include <thread>
1311

1412
static int x = 0;
@@ -18,21 +16,13 @@ static void handler(int) {
1816

1917
int main() {
2018
struct sigaction sa {};
21-
memset(&sa, 0, sizeof(sa));
2219
sa.sa_handler = handler;
2320
int tmp = sigaction(SIGALRM, &sa, nullptr);
2421
if (tmp != 0) {
2522
perror("sigaction");
2623
return EXIT_FAILURE;
2724
}
2825

29-
sigset_t set;
30-
sigemptyset(&set);
31-
if (sigaddset(&set, SIGALRM) == -1) {
32-
perror("sigaddset");
33-
return EX_OSERR;
34-
}
35-
3626
cxxitimer::ITimer_Real timer(2.0, 1.0);
3727

3828
timer.start();

0 commit comments

Comments
 (0)