Go to the documentation of this file.
47 unsigned int Foam::timer::oldTimeOut_ = 0;
52 void Foam::timer::sigHandler(
int)
75 <<
"timer already used."
89 <<
"Installing timeout " << int(
timeOut_) <<
" seconds"
90 <<
" (overriding old timeout " << int(oldTimeOut_) <<
")." <<
endl;
104 <<
"timeOut=" << int(timeOut_)
105 <<
" : resetting timeOut to " << int(oldTimeOut_) <<
endl;
108 ::alarm(oldTimeOut_);
~timer()
Destructor. Restores the alarm and signal handler as required.
static void resetHandler(const char *what, int sigNum)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define DebugInFunction
Report an information message using Foam::Info.
timer(unsigned int seconds)
Construct with specified time-out, a value of 0 makes it a no-op.
static jmp_buf envAlarm
State for setjmp. Needed by macro timedOut.
File-local code for setting/resetting signal handlers.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void setHandler(const char *what, int sigNum, void(*handler)(int))
unsigned int timeOut_
The time-out value (seconds). Needed by macro timedOut.
defineTypeNameAndDebug(combustionModel, 0)