wt200999
08-01-2009, 23:59
Is it okay to use the timer class in windriver for quick times. I am trying to get the time between the fast loops, but I am not sure how to achieve this. I see in the IterativeRobot.cpp that they implement a timer, maybe instead of creating my own I can get something from that one. This is how I had first though of using it with its own timer (it would start in the constructor):
void Robot::AutonomousContinuous()
{
Timer->Stop();
m_class.Process(Timer->Get());
Timer->Reset();
Timer->Start();
}
Or maybe there is a better way of doing this? I want to make sure that I am getting an accurate time if that's possible.
void Robot::AutonomousContinuous()
{
Timer->Stop();
m_class.Process(Timer->Get());
Timer->Reset();
Timer->Start();
}
Or maybe there is a better way of doing this? I want to make sure that I am getting an accurate time if that's possible.