Application time of VB6

I am trying to profile a VB6 application.

Basically, I would like to work out a method at the method level, how much time is running.

However, VB6 only supports 1 second. Is there a good way to develop milliseconds, etc.

+3
source share
3 answers

Although MSDN says the timer is accurate to 1 second, I found it better than in practice.

GetTickCount is usually more accurate about 10 to 16 milliseconds. Here is the VB6 announcement.

 Declare Function GetTickCount Lib "Kernel32" () As Long

the same Microsoft article shows how to use QueryPerformanceCounterit to get much higher accuracy if your computer supports it and if you need it.

+4

CCRP

+2

If I remember correctly, TimeGetTime is pretty accurate from winmm.dll.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd757629%28v=vs.85%29.aspx

0
source

Source: https://habr.com/ru/post/1722608/


All Articles