反应时间问题!(在线等)

studelphi 2004-12-09 10:32:24
想测试一下服务器和客户端反应的时间,也就是点一下客户端的请求按纽,会从服务器返回一条MESSAGE,
(已经做好了)

如何取得这中间的反应时间,好象有一个记录CPU时间的函数,不记得了!请大家赐教/!
...全文
134 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
pressman 2004-12-09
  • 打赏
  • 举报
回复
var dw1,dw2:DWORD;

//点一下客户端的请求按纽
dw1:=GetTickCount
//服务器返回一条MESSAGE
dw2:=GetTickCount

dw2-dw1 的结果是以千分之一秒为结果的。
symk0014 2004-12-09
  • 打赏
  • 举报
回复
好象是说 从电脑启动开始计算的时间吧....
wfhlxl 2004-12-09
  • 打赏
  • 举报
回复
send i:=GetTickCount
accept j:=GetTickCount
j-i is your want timer blank
studelphi 2004-12-09
  • 打赏
  • 举报
回复
COME FROM DELPHI 6‘HELP
-------------------------
GetTickCount is a Cardinal function used to retrieve the number of milliseconds since the computer was started.
GetTickCount is often used when calculating the response times for Indy components such as TIdEcho and TIdTime.
GetTickCount encapsulates the platform-specific calls necessary to provide a high resolution timer for fixed duration events. On the Windows platform, the function used is Windows.GetTickCount. On the Linux platform, GetTickCount uses the library function clock adjusted to thousandths of CLOCKS_PER_SECs.
studelphi 2004-12-09
  • 打赏
  • 举报
回复
TO aiirii(ari-爱的眼睛) :
怎么用呀,能详细点吗?
我这样写:showmessage(inttostr(GetTickCount()));
弹出:6872312 这么大的数字,它代表多少毫秒?还有,GETTICKCOUNT得出的这个结果,
是指哪段时间?
aiirii 2004-12-09
  • 打赏
  • 举报
回复
DWORD GetTickCount(VOID)
studelphi 2004-12-09
  • 打赏
  • 举报
回复
想测试一下服务器和客户端反应的时间,也就是点一下客户端的请求按纽,会从服务器返回一条MESSAGE,
(已经做好了)
如何取得这中间的反应时间,好象有一个记录CPU时间的函数,不记得了!请大家赐教/!

1,184

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧