ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

TestTimer.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <conio.h>
00003 #include <windows.h>
00004 
00005 void main ( int argc, char** argv, char** environ )
00006 {
00007  LARGE_INTEGER liFrequency;
00008  LARGE_INTEGER liStartTime;
00009  LARGE_INTEGER liCurrentTime;
00010 
00011  QueryPerformanceFrequency ( &liFrequency );
00012  printf ( "HIGH RESOLUTION PERFOMANCE COUNTER Frequency = %I64d CLOCKS IN SECOND\n",
00013          liFrequency.QuadPart );
00014 
00015 
00016  if (liFrequency.QuadPart == 0)
00017  {
00018     printf("Your computer does not support High Resolution Performance counter\n");
00019     return;
00020  }
00021 
00022  printf ( "Press <ENTER> to start test...\n" );
00023  getchar();
00024 
00025  printf ( "\nPress any key to quit test\n\n" );
00026  QueryPerformanceCounter ( &liStartTime );
00027  for (;;)
00028  {
00029     QueryPerformanceCounter ( &liCurrentTime );
00030     printf("Elapsed Time : %8.6f mSec\r",
00031           ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart )) );
00032     if (_kbhit())
00033         break;
00034  }
00035 
00036 
00037 }

Generated on Sat May 26 2012 04:36:33 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.