10-06-2009, 11:17 PM
PHP كود :
function cpugettick:int64;
asm
dw 310Fh // rdtsc Counter only for Pentim Processors and equivalents
end;
var
maxValue:integer;
Clock: Int64;
MyRandom: integer;
begin
maxValue:=100;
Clock:= cpugettick;
// get a rundom number betwen 0 and maxvalue
MyRandom:= clock mod maxValue;
Label1.Caption:=inttostr(MyRandom);
end;
