#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <time.h>

#include "debug.hpp"


cdebugclass::cdebugclass ()
{
     char tm[20];
     char dt[20];
     char *debug_file;

     debug_file = getenv ("DEBUG_DEVICE");
     if (debug_file)
     {
          out.open (debug_file);

          if (out.good())
          {
               _strtime (tm);
               _strdate (dt);
               out << "Program Started at " << tm << " " << dt << "\n\n" << endl;
          }
     }
}

cdebugclass::~cdebugclass ()
{
     char tm[20];
     char dt[20];

     if (out.good())
     {
          _strtime (tm);
          _strdate (dt);
          out << "\nProgram Terminated at " << tm << " " << dt << "\n\n";

          out.close();
     }
}



cdebugclass cdebug;
