php程式如下:
<?php
$counter=1;
set_time_limit(300);
$begin_time=time();
for ($i=1;$i<=100;$i++)
for ($j=1;$j<=100;$j++)
for ($k=1;$k<=100;$k++)
$counter++;
$end_time=time();
echo "begin time:".$begin_time."<BR>";
echo "<BR>end time:".$end_time."<BR>";
$total=$end_time-$begin_time;
echo "total spent time:".$total;
?>
asp程式如下:
<%
counter=1
begin_time=time()
for i=1 to 100
for j=1 to 100
for k=1 to 100
counter=counter+1
next
next
next
end_time=time()
response.write(begin_time)
response.write("<p>")
response.write(end_time)
%>