Public Function SetElapsedTime(ByVal Start As Boolean) As Single '************************************************************** 'Author: Aaron Perkins 'Last Modify Date: 23/05/2011 By MaTeO 'Gets the time that past since the last call '[MaTeO] Agrego cambios a la funcion '************************************************************** Dim Start_Time As Currency Static End_Time As Currency Static Timer_Freq As Currency 'Get the timer frequency If Timer_Freq = 0 Then QueryPerformanceFrequency Timer_Freq End If
'Get current time Call QueryPerformanceCounter(Start_Time)
If Not Start Then 'Calculate elapsed time SetElapsedTime = (Start_Time - End_Time) / Timer_Freq * 1000
'Get next end time Else Call QueryPerformanceCounter(End_Time) End If End Function