// this is for exchanging Runtime iteration
// & timing calculations between different ThreadRecs().
// These are used by NetXec() to sniff out dead threads. 

public class RunInfo implements RunInfoConstants
{
Object infoObject;  // ThreadRec.class reference
int nx_index;
volatile long now;            // Time of the last HyperView() run of this Thread
long runLag;    // 
volatile long lastRun;   //    If Report Bit set 
long startTime; //
volatile long waitTime;
volatile int runFlags;
int serverFlags;
volatile int runState;
int iteration;
int debugVal;

RunInfo()
{
   nx_index     = -1;
   now          = 0;            // Time of the last HyperView() run of this Thread
   runLag       = 0;    // 
   lastRun      = 0;   //    If Report Bit set 
   startTime    = 0; //
   waitTime     = 1000l;
   runFlags     = 0;       
   runState     = RunInfoConstants.RT_INIT;
   iteration    = 0;
   debugVal     = 0;
};

RunInfo(Object tObject)
{
   super();
   infoObject = tObject;
}

public RunInfo getRunInfo()
{
   try
   {
      if(infoObject instanceof ThreadReport)
      {
         return (RunInfo)((ThreadReport)infoObject).getRunInfo();
      }
   }
   catch(Exception all)
   {
      System.out.println("ERROR! getRunInfo()");
   }
   System.out.println("uninstantiated RunInfo RunInfo.getRunInfo() ->"+infoObject.toString());
   return (RunInfo)this;
}
}
