Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.27 KB

elapsed-time-automation-classes.md

File metadata and controls

37 lines (28 loc) · 1.27 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Elapsed Time: Automation Classes | Microsoft Docs
11/04/2016
cpp-windows
reference
C++
adding dates
calculating dates and times
dates, calculating intervals
elapsed time, calculating in Automation
Automation classes, elapsed time
time, elapsed
intervals, date and time
calculations, date and time
26b34b37-c10e-4b91-82c3-1dc5ffb5361f
10
mikeblome
mblome
ghogen

Elapsed Time: Automation Classes

This procedure shows how to calculate the difference between two CTime objects and get a CTimeSpan result.

To calculate elapsed time

  1. Create two COleDateTime objects.

  2. Set one of the COleDateTime objects to the current time.

  3. Perform some time-consuming task.

  4. Set the other COleDateTime object to the current time.

  5. Take the difference between the two times.

    [!code-cppNVC_ATLMFC_Utilities#178]

See Also

Date and Time: Automation Support