2#include "TermMaxTimeOp.h"
7 uint *value =
new uint(0);
8 state->getRegistry()->registerEntry(
"term.maxtime", (voidP) value, ECF::UINT,
9 "max number of seconds to run (default: none)");
15 if(!state->getRegistry()->isModified(
"term.maxtime"))
18 voidP sptr = state->getRegistry()->getEntry(
"term.maxtime");
19 maxTime_ = *((uint*) sptr.get());
27 if(state->getElapsedTime() > maxTime_) {
28 state->setTerminateCond();
29 ECF_LOG(state, 1,
"Termination: designated time elapsed. (" + uint2str(maxTime_) +
" seconds)");
bool operate(StateP)
perform the designated operation
void registerParameters(StateP)
Register parameters with the Registry. Called before Operator::initialize.
bool initialize(StateP)
Perform initialization. Called before Operator::operate. By default, if the return value is false,...