class RTime | .h |
constructor | RTime() |
destructor | ~RTime() |
AddSimTime | void AddSimTime(int msecs) Another 'msecs' of time was simulated |
Start | void Start() Start the real timer |
Stop | void Stop() Stop the real timer |
Update | void Update() Update the real timing |
/*
* RTime
* 05-10-00: Created!
* (c) Dolphinity/Ruud van Gaal
*/
#include <racer/racer.h>
#include <qlib/debug.h>
#pragma hdrstop
DEBUG_ENABLE
RTime::RTime()
{
// Default time span
span=0.01;
tmr=new QTimer();
curRealTime=0;
curSimTime=0;
}
RTime::~RTime()
{
}
/**********
* Attribs *
**********/
void RTime::AddSimTime(int msecs)
// Another 'msecs' of time was simulated
{
curSimTime+=msecs;
}
/*************
* Start/stop *
*************/
void RTime::Start()
// Start the real timer
{
tmr->Start();
}
void RTime::Stop()
// Stop the real timer
{
tmr->Stop();
}
/*********
* Update *
*********/
void RTime::Update()
// Update the real timing
{
curRealTime=tmr->GetMilliSeconds();
}