Boost logo

Boost :

From: Russell Hind (rhind_at_[hidden])
Date: 2003-03-24 10:29:59


Do you want the C++Builder project as well, or is this enough?

Cheers

Russell

Beman Dawes wrote:
>
> Interesting. Could you please post the entire program as an attachment,
> so I can just compile and run it without any cut-and-paste?
>
> Thanks,
>
> --Beman
>


#include <windows.h>
#include <iostream>
int main(int argc, char* argv[])
{
LARGE_INTEGER Start, End, Temp;
    QueryPerformanceCounter(&Start);
    for (unsigned int i = 0; i < 1000000; ++i)
    {
        QueryPerformanceCounter(&Temp);
    }
    QueryPerformanceCounter(&End);

LARGE_INTEGER Frequency;
    QueryPerformanceFrequency(&Frequency);

double Time = (static_cast<double>(End.QuadPart) - Start.QuadPart) / Frequency.QuadPart;
    std::cout << Time << std::endl;
    return 0;
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk