
'------------------------
'MEASURING EXECUTION TIME
'========================
  
  DECLARE FUNCTION QueryPerformanceCounter LIB "KERNEL32.DLL" ALIAS "QueryPerformanceCounter" (lpPerformanceCount AS QUAD) AS LONG
  DECLARE FUNCTION QueryPerformanceFrequency LIB "KERNEL32.DLL" ALIAS "QueryPerformanceFrequency" (lpFrequency AS QUAD) AS LONG

  dim as quad t1,t2,fr

  QueryPerformanceCounter t1
  
  dim sys i,e
  
  e=1E8 'NUMBER OF LOOPS
  
  '-------------------
  'CODE BEING MEASURED
  '===================
  '
  for i=1 to E
  next
  
  '===================
  
  
  QueryPerformanceCounter t2
  QueryPerformanceFrequency fr
  
  print "100 million Loops: Exec time: " str((t2-t1)/fr)
  
 
 
