/**********************************************************************
*
*  Filename :  clock.cpp
*                                                                        
*  This is the implementation file for the class Clock              
*  The member functions defined here are:               
*  constructor, destructor, Incriment, GetCurTime, Jump, Reset
*
***********************************************************************/

#include "clock.h"

//************************************************************************
//  Function  Name :  Construcor
//
//  Purpose & Operation :
//      Constructs the Clock object.
//*************************************************************************
Clock::Clock()
{
        //initialize CurTime data member
        CurTime = 0;

}  //constructor


//************************************************************************
//  Function  Name :  Destructor
//
//  Purpose & Operation :
//	Destructs the Clock object
//*************************************************************************
Clock::~Clock()
{
	//Does Nothing

}  //destructor


/************************************************************************
*
*  Function  Name : Incriment
*
*  Purpose & Operation :                                                 
*  Incriment CurTime by 1 and pass back the new value
*
*************************************************************************/
int Clock::Incriment()
{
	CurTime++;
	return(CurTime);
}

/************************************************************************
*
*  Function  Name : GetCurTime
*
*  Purpose & Operation :
*  Return the current time                            
*
*************************************************************************/
int Clock::GetCurTime()
{
	return(CurTime);
}

/************************************************************************
*
*  Function  Name : Jump
*
*  Purpose & Operation :
*  Add a given arbitrary constant positive OR negetive value to CurTime.  
*  This allows both forward and backward time travel of arbitrary
*  magnitide. Return the resulting time. 
*
*************************************************************************/
int Clock::Jump(int distance) 
{
	CurTime += distance;
	return(CurTime);
}


int Clock::Reset()
{
	CurTime = 0;
	return(CurTime);
}

