49 unsigned int Foam::timer::oldTimeOut_ = 0;
54 void Foam::timer::sigHandler(
int)
77 <<
"timer already used." 91 <<
"Installing timeout " << int(
timeOut_) <<
" seconds" 92 <<
" (overriding old timeout " << int(oldTimeOut_) <<
")." <<
endl;
106 <<
"timeOut=" << int(timeOut_)
107 <<
" : resetting timeOut to " << int(oldTimeOut_) <<
endl;
110 ::alarm(oldTimeOut_);
static void setHandler(const char *what, int sigNum, void(*handler)(int))
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineDebugSwitchWithName(pointMVCWeight, "pointMVCWeight", 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void resetHandler(const char *what, int sigNum)
#define DebugInFunction
Report an information message using Foam::Info.
File-local code for setting/resetting signal handlers.
errorManip< error > abort(error &err)
~timer()
Destructor. Restores the alarm and signal handler as required.
registerDebugSwitchWithName(solution, solution, "solution")
Macro definitions for debug switches.
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.