El 11/04/18 a les 10:06, Luca Olivetti ha escrit:
BEFORE (with gettickcount): ---------------------------------------------------------------------- var PreviousTick:DWORD; ... PreviousTick:=GetTickCount; ... ... if DWORD(GetTickCount-PreviousTick)>WaitTime then....
BTW, the DWORD typecast is only necessary with fpc, the following program gives 4 and 4 if compiled with delphi 2, 4 and -4294967292 if compiled with fpc 3.0.4
program project1; uses windows; var t1,t2,t3:dword; begin t1:=$fffffffe; t2:=2; t3:=t2-t1; writeln(t3); writeln(t2-t1); end. -- Luca _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal