Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
The following procedure shows how to calculate the difference between two CTime objects and get a CTimeSpan result.
To calculate elapsed time
Use the CTime and CTimeSpan objects to calculate the elapsed time, as follows:
CTime startTime = CTime::GetCurrentTime(); // ... perform time-consuming task ... CTime endTime = CTime::GetCurrentTime(); CTimeSpan elapsedTime = endTime - startTime;Once you have calculated
elapsedTime, you can use the member functions of CTimeSpan to extract the components of the elapsed-time value.