24 #if (defined(DISABLE_TIMEOUT) || defined(MINGW))
26 void nrn_timeout(
int seconds) {}
31 static struct itimerval
value;
32 static struct sigaction act, oact;
34 static void timed_out(
int sig) {
37 printf(
"timed_out told=%g t=%g\n", told,
t);
46 void nrn_timeout(
int seconds) {
51 printf(
"nrn_timeout %d\n", seconds);
55 act.sa_handler = timed_out;
56 act.sa_flags = SA_RESTART;
57 if (sigaction(SIGALRM, &act, &oact)) {
58 printf(
"sigaction failed\n");
62 sigaction(SIGALRM, &oact, (
struct sigaction*) 0);
64 value.it_interval.tv_sec = seconds;
65 value.it_interval.tv_usec = 0;
66 value.it_value.tv_sec = seconds;
67 value.it_value.tv_usec = 0;
68 if (setitimer(ITIMER_REAL, &
value, (
struct itimerval*) 0)) {
69 printf(
"setitimer failed\n");
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
void nrn_abort(int errcode)