![]() |
CPerformance Submitted on: 10/10/98 By: Ricardo Saat Category: VB 5.0/6.0,VB 4.0/32 Users have accessed this code 1498 times. |
This class encapsulate QueryPerfomanceXXX API functions to mesure small time intervals. You can use this class to mesure how much time your code take. This function can mesure time intervals near 0.1 ms , 10 times better then timeGetTime() API or GetTickCount() that have an error of 50ms. Example: Dim m_performance As CPerformance Dim i As integer Set m_performance = new CPerformance m_performance.StartCounter() 'Do something For i = 1 to 1000 next i m_performance.StopCounter() Debug.print m_performance.TimeElapsed() 'Time in ms (1/1000) s 'this is a float number 'ex: 1.54 ms |
|
Menu*
Home | 
Intro | 
Search | 
Browse | 
Top Code | 
Newest Code | 
Submit | 
Discuss | 
Code of the Day | 
Recommended Reading | 
Advertising | 
Other sites | 
Feedback | 
About
|