If you need a high resolution timer then you'll need to use QueryPerformanceFrequency() and QueryPerformanceCounter() -
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
_LARGE_INTEGER start,end,result,freq;
int i=0;
if(!QueryPerformanceFrequency(&freq))
return 0;
result.QuadPart=0;
QueryPerformanceCounter(&start);
while (i++<1000)
cout << "hello"<<endl;
QueryPerformanceCounter(&end);
result.QuadPart=end.QuadPart-start.QuadPart;
cout <<(double)result.QuadPart/freq.QuadPart;
return 0;
}