FUNCTION MAIN()
cTimeStart := Time()
i := 1
x := 0
FOR i := 1 to 12000000
x++
NEXT
cTimeEnd := Time()
MsgAlert( "Start : " + cTimeStart + CRLF + ;
"End : " + cTimeEnd + CRLF + ;
CRLF + ;
"Elapsed : " + TIME_DIFF( cTimeStart, cTimeEnd), "Elapsed Time ( 12000000-Counter )" )
RETURN NIL
// -----------------------------
FUNCTION TIME_COUNT(cTIME1,cTIME2)
local nTIME1, nTIME2, nDELSECS, nHRS, nMINS, nSECS, nSECS1, nSECS2
nSECS1 := (val(substr(cTIME1,1,2)) * 3600) +;
(val(substr(cTIME1,4,2)) * 60) + (val(substr(cTIME1,7)))
nSECS2 := (val(substr(cTIME2,1,2)) * 3600) +;
(val(substr(cTIME2,4,2)) * 60) + (val(substr(cTIME2,7)))
nDELSECS := abs(nSECS2 - nSECS1)
nHRS := int(nDELSECS / 3600)
nMINS := int((nDELSECS - nHRS * 3600) / 60)
nSECS := nDELSECS - (nHRS * 3600) - (nMINS * 60)
RETURN right("00" + ltrim(str(nHRS)),2) + ":" + ;
right("00" + ltrim(str(nMINS)),2) + ":" + ;
right("00" + ltrim(str(nSECS)),2)
MSGBOX( "Please wait..." )
WHILE ... // condition
// do a lot of work
ENDDO
CLOSE MSGBOX
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 83 guests