Hi all
Is there any way do it in in FWH ?
Regards,
- Ramesh Babu P
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL i, j, a[ 10 ]
FOR i = 1 TO 10
FOR j = 1 TO 10000; j = j; NEXT
a[ i ] = MILLISECS()
// a[ i ] = GETTICKCOUNT()
NEXT
WQOUT( a )
RETURN NIL
STATIC FUNCTION MILLISECS()
LOCAL cPerformanceCount := SPACE( 8 )
LOCAL nCount
STATIC nFreq
QPCOUNTER( cPerformanceCount )
nCount = BIN2NUM( cPerformanceCount )
IF nFreq = NIL
QPFREQUENCY( cPerformanceCount )
nFreq = BIN2NUM( cPerformanceCount )
ENDIF
RETURN ROUND( nCount / nFreq * 1000, 0 )
STATIC FUNCTION BIN2NUM( cBinData )
LOCAL nLow := BIN2L( LEFT( cBinData, 4 ) )
LOCAL nHigh := BIN2L( RIGHT( cBinData, 4 ) )
IF nLow < 0; nLow += 4294967296; ENDIF
RETURN nLow + 4294967296 * nHigh
DLL32 STATIC FUNCTION QPCOUNTER( cPerformanceCount AS LPSTR ) AS BOOL;
PASCAL FROM "QueryPerformanceCounter" LIB "kernel32.dll"
DLL32 STATIC FUNCTION QPFREQUENCY( cPerformanceCount AS LPSTR ) AS BOOL;
PASCAL FROM "QueryPerformanceFrequency" LIB "kernel32.dll"
DLL32 STATIC FUNCTION GETTICKCOUNT() AS DWORD;
PASCAL FROM "GetTickCount" LIB "kernel32.dll"
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 57 guests