| Kernel - Get exact duration of a VBS function using msPerformanceCounter | |
|---|---|
Dim Kernel, OldhrTimeCounter
Set Kernel = CreateObject("ScriptUtils.Kernel")
'Get counter
OldhrTimeCounter = Kernel.hrTimeCounter
'Some operation taking many time
Dim Data, Parameter
Parameter = "Some parameter"
Data = CreateData(Parameter)
'Count number of microsecond
Dim msTime
msTime = Kernel.hrTimeCounter - OldhrTimeCounter
'Output results
Wscript.Echo "CreateData takes " & msTime & " milisecond" | |
COM API for calling some of Kernel32 functions.
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz