75 ((x).timeOut_ ? setjmp(Foam::timer::envAlarm) : false) 89 static unsigned int oldTimeOut_;
95 static void sigHandler(
int);
115 explicit timer(
unsigned int seconds);
Implements a timeout mechanism via sigalarm.
ClassName("timer")
Declare name of the class and its debug switch.
~timer()
Destructor. Restores the alarm and signal handler as required.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
timer(unsigned int seconds)
Construct with specified time-out, a value of 0 makes it a no-op.
unsigned int timeOut_
The time-out value (seconds). Needed by macro timedOut.
static jmp_buf envAlarm
State for setjmp. Needed by macro timedOut.