Click here to Skip to main content
15,915,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where Do I Add the Filters used for File->Open? Pin
David Crow16-Jun-03 4:12
David Crow16-Jun-03 4:12 
GeneralRe: Where Do I Add the Filters used for File->Open? Pin
James A Beggs16-Jun-03 4:13
James A Beggs16-Jun-03 4:13 
GeneralRe: Where Do I Add the Filters used for File->Open? Pin
James A Beggs16-Jun-03 4:15
James A Beggs16-Jun-03 4:15 
GeneralRe: Where Do I Add the Filters used for File->Open? Pin
David Crow16-Jun-03 4:34
David Crow16-Jun-03 4:34 
GeneralProgrammatically installing a modem using Win32 API Pin
Ajith Kumar16-Jun-03 2:46
Ajith Kumar16-Jun-03 2:46 
GeneralMeasuring time of execution Pin
affzan16-Jun-03 2:04
affzan16-Jun-03 2:04 
GeneralRe: Measuring time of execution Pin
alex.barylski16-Jun-03 2:23
alex.barylski16-Jun-03 2:23 
GeneralRe: Measuring time of execution Pin
peterchen16-Jun-03 2:26
peterchen16-Jun-03 2:26 
For Win32/x86 the most accurate is:
class CHPFCounter
{
  public:
    __int64  m_started;

    void     Start()
    {
       LARGE_INTEGER  li;
       QueryPerformanceCounter(&li);
       m_started = li.QuadPart;
    }

    double  Time()
    {
       LARGE_INTEGER  li;
       QueryPerformanceCounter(&li);
       __int64 ticks =li.QuadPart - m_started;
       QueryPerformanceFrequency(&li);
       double seconds = (double) ticks / li.QuadPart;
       return seconds;
    }
};

Time() returns time in seconds (resolution is around CPU clock).
However, it's recommended to
a) measure each snippet multiple times, to see variations
b) verify the assembly that you indeed measure what you think you measure


"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS

sighist | Agile Programming | doxygen

GeneralRe: Measuring time of execution Pin
Tarundeep Singh Kalra16-Jun-03 3:09
Tarundeep Singh Kalra16-Jun-03 3:09 
GeneralRe: Measuring time of execution Pin
Hosam Aly Mahmoud16-Jun-03 5:48
Hosam Aly Mahmoud16-Jun-03 5:48 
Generalthe way to access FileSystemObject Pin
Krisna Adityawan16-Jun-03 1:54
Krisna Adityawan16-Jun-03 1:54 
GeneralGetting user information Pin
abhinarulkar16-Jun-03 1:49
abhinarulkar16-Jun-03 1:49 
GeneralRe: Getting user information Pin
David Crow16-Jun-03 3:16
David Crow16-Jun-03 3:16 
GeneraltAB CONTROL Pin
vcseeker16-Jun-03 1:36
vcseeker16-Jun-03 1:36 
GeneralRe: tAB CONTROL Pin
David Crow16-Jun-03 3:47
David Crow16-Jun-03 3:47 
GeneralRe: tAB CONTROL Pin
vcseeker16-Jun-03 18:00
vcseeker16-Jun-03 18:00 
GeneralRe: tAB CONTROL Pin
vcseeker17-Jun-03 0:45
vcseeker17-Jun-03 0:45 
GeneralRe: tAB CONTROL Pin
Joan M16-Jun-03 5:16
professionalJoan M16-Jun-03 5:16 
GeneralRe: tAB CONTROL Pin
vcseeker16-Jun-03 17:59
vcseeker16-Jun-03 17:59 
GeneralRe: tAB CONTROL Pin
vcseeker17-Jun-03 0:45
vcseeker17-Jun-03 0:45 
GeneralRe: tAB CONTROL Pin
Joan M17-Jun-03 0:55
professionalJoan M17-Jun-03 0:55 
GeneralRe: tAB CONTROL Pin
vcseeker17-Jun-03 2:27
vcseeker17-Jun-03 2:27 
GeneralRe: tAB CONTROL Pin
Joan M17-Jun-03 21:40
professionalJoan M17-Jun-03 21:40 
GeneralRe: tAB CONTROL Pin
vcseeker18-Jun-03 1:41
vcseeker18-Jun-03 1:41 
GeneralProblem with displaying images Pin
Franz Klein16-Jun-03 1:10
Franz Klein16-Jun-03 1:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.