1,593
社区成员
发帖
与我相关
我的任务
分享
with TIdHTTP.Create(nil) do
try
Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)';
x := GetTickCount;
OutputDebugStringA(PChar('开始GET' + IntToStr(GetCurrentThreadId)));
S := Get('http://www.baidu.com');{线程创建越多,此处返回越慢}
OutputDebugString(PChar('---------Get耗时:'+IntToStr(GetTickCount-x) + '毫秒 THreadId:' + IntToStr(GetCurrentThreadId)));