XxKanexX
2006-04-12 04:06:39
Re-written Script:
Const
MegDownloading = 50; //MegaBytes Downloading.
KBps = 32; //KiloBytes per Second Downloading at.
function DecDown(e: Extended): extended;
var i: integer;
begin
for i:= 1 to Length(floattostr(e)) do
begin
if (copy(floattostr(e), i, 1) = '.') then
begin
result:= strtofloat(copy(floattostr(e), 1, i + 2));
exit;
end;
end;
end;
var Bytes, Speed: integer;
var Time: extended;
begin
ClearDebug;
Bytes:= MegDownloading * 1000000;
Speed:= (KBps * 100)*8;
Time:= (Bytes/Speed)/60;
Writeln(inttostr(MegDownloading) + ' Meg @ ' + inttostr(KBps) + 'KB/ps Takes Approx: ')
if (Time < 60) then
Writeln(floattostr(DecDown(Time)) + ' Minute[s].');
if (Time > 1) and (Time > 60) then
Writeln(floattostr(DecDown(Time/60)) + ' Hour[s].');
end.