Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Introduction to SSE Programming

, 10 Jul 2003
An article describes programming floating-point calculations using Streaming SIMD Extensions
// TimeCounterEx.h


#ifndef TIME_COUNTER_H
#define TIME_COUNTER_H

#pragma warning( disable : 4710 )

// Helper class used to show execution time
class CTimeCounter
{
public:
    CTimeCounter()
    {
        QueryPerformanceFrequency(&m_nFreq);
        QueryPerformanceCounter(&m_nBeginTime);
    }

    __int64 GetExecutionTime()
    {
            LARGE_INTEGER nEndTime;
            __int64 nCalcTime;

        	QueryPerformanceCounter(&nEndTime);
            nCalcTime = (nEndTime.QuadPart - m_nBeginTime.QuadPart) *
                1000/m_nFreq.QuadPart;

            delete this;

            return nCalcTime;
    }

    ~CTimeCounter()
    {
    }


protected:
    LARGE_INTEGER m_nFreq;
    LARGE_INTEGER m_nBeginTime;

};



#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Alex Fr
Software Developer
Israel Israel
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 11 Jul 2003
Article Copyright 2003 by Alex Fr
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid