Dillinger4
Jun 18th, 2000, 07:26 AM
Does any one knoe how i can calculate elapsed time?
This is the crap that microsoft has included in their
MSDN Library:
CTime startTime = CTime::GetCurrentTime();
// ... perform time-consuming task ...
CTime endTime = CTime::GetCurrentTime();
CTimeSpan elapsedTime = endTime - startTime;
They say that you have to include #include <afx.h>.
So are Ctime & CTimeSpan, classes that are already defined
in the afx header file? Im trying to calculate feet travled
based on current speed. but i have no clue how to do this.
do while(cur_speed > 0)
{
feet_travled = cur_speed * seconds() * 1.46;
}
thanks
This is the crap that microsoft has included in their
MSDN Library:
CTime startTime = CTime::GetCurrentTime();
// ... perform time-consuming task ...
CTime endTime = CTime::GetCurrentTime();
CTimeSpan elapsedTime = endTime - startTime;
They say that you have to include #include <afx.h>.
So are Ctime & CTimeSpan, classes that are already defined
in the afx header file? Im trying to calculate feet travled
based on current speed. but i have no clue how to do this.
do while(cur_speed > 0)
{
feet_travled = cur_speed * seconds() * 1.46;
}
thanks