'##############
'start 计算页面时间
Class PageTimer
private startTime,endTime Sub startTimer()
startTime=timer() EndSub
public function delay(s)
SecCount = 0
Sec2 = 0 While SecCount < s + 1
Sec1 =Second(Time()) If Sec1 <> Sec2 Then
Sec2 =Second(Time())
SecCount = SecCount + 1 EndIf Wend EndFunction Sub showTimer() if startTime="" or isempty(startTime)then
echo "请先执行 call startTimer() "
exit sub EndIf
endTime=timer()
echo "页面执行时间:"&FormatNumber((endTime-startTime)*1000,3,-1,0,0)&"毫秒" EndSub End Class 'End 计算页面加载时间
'##############
用的时候就:
'##asp开始放下面代码' dim asptimer set asptimer=new PageTimer
asptimer.startTimer()