Retrieves the current value of the high-resolution performance counter, if one exists.
vhrCounter = Kernel.hrCounter
double
This property uses QueryPerformanceCounter API function.
Kernel - Get exact consumed time of VBS function |
Dim Kernel, OldCounter
Set Kernel = CreateObject("ScriptUtils.Kernel")
'Get counter
OldCounter = Kernel.hrCounter
'Some operation taking many time
Dim Data, Parameter
Parameter = "Some parameter"
Data = CreateData(Parameter)
'Count number of microsecond
Dim msTime
msTime = 1000*(Kernel.hrCounter - OldCounter)
msTime = msTime / Kernel.hrFrequency
'Output results
Wscript.Echo "CreateData takes " & msTime & " milisecond" |
Kernel.hrFrequency, Kernel.hrTimeCounter
CloseHandle, CopyFile, CreateProcess, DeleteFile, GetFileSize, MoveFile, Sleep, SwitchToThread, WaitForSingleObject
CommandLine, ComputerName, CurrentDirectory, CurrentProcess, CurrentThread, EnvironmentStrings, EnvironmentVariables, hrCounter, hrFrequency, hrTimeCounter, TempPath, TickCount
COM API for calling some of Kernel32 functions.
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz