Is it possible to time the execution of a PBDLL program without creating or showing a dialog? I want to time the response of a synchronous SHELL but not show any dialog.
TIA.
TIA.

DIM dpStart AS LOCAL DOUBLE dpStart = TIMER SHELL (whatever) dpElapsed = TIMER-dpStart
MSGBOX "Click OK and start your stopwatch..." SHELL (whatever) MSGBOX "Stop the stopwatch NOW!"
DECLARE FUNCTION QueryPerformanceCounter LIB "KERNEL32.DLL" ALIAS "QueryPerformanceCounter" (lpPerformanceCount AS QUAD) AS LONG DECLARE FUNCTION QueryPerformanceFrequency LIB "KERNEL32.DLL" ALIAS "QueryPerformanceFrequency" (lpFrequency AS QUAD) AS LONG FUNCTION PBMAIN DIM freq AS QUAD, a AS QUAD, b AS QUAD,overhead AS QUAD, i AS LONG, results AS EXT queryperformancefrequency freq queryperformancecounter a queryperformancecounter b overhead = b-a queryperformancecounter a MSGBOX "close me" queryperformancecounter b results = ((b - a)-overhead) / freq MSGBOX FORMAT$(results,"##0.0000") & " seconds." END FUNCTION
DECLARE FUNCTION QueryPerformanceFrequency LIB "KERNEL32.DLL" ALIAS "QueryPerformanceFrequency" (lpFrequency AS QUAD) AS LONG FUNCTION PBMAIN LOCAL result AS QUAD, freq AS QUAD QueryPerformanceFrequency Freq result = 9220000000000000000&& \ freq ' seconds \ minutes \ hours \ days \ years MSGBOX STR$(result \ 60 \ 60 \ 24 \ 365) END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment