This procedure shows how to calculate the difference between two CTime objects and get a CTimeSpan result.
To calculate elapsed time
COleDateTime timeStart, timeEnd;
timeStart = COleDateTime::GetCurrentTime();
// ... perform time-consuming task
timeEnd = COleDateTime::GetCurrentTime();
COleDateTimeSpan spanElapsed = timeEnd - timeStart;