Delphi中GetTickCount函数的使用
来源:互联网 发布:ssc源码论坛 编辑:程序博客网 时间:2024/05/16 07:31
【函数名】 GetTickCount
【库名】 kernel32
【说明】 用于获取自windows启动以来经历的时间长度(毫秒)
【返回值】 Long,以毫秒为单位的windows运行时间
通常用来计算某个操作所使用的时间:
Start:=GetTickCount;
...//执行耗时的操作
Stop:=GetTickCount;
TimeUsed:=(Stop-Start)/1000; //使用了xxx秒
也可以用来做延时程序:
Procedure TForm1.Delay(Msecs: Integer);var firstTickCount : real;begin firstTickCount := GetTickCount; Repeat Until ((GetTickCount - firstTickCount) >= longInt(Msecs));end;
if ((GetTickCount - MktHQRefreshTime) div 1000) >= SSConfig.HqRefreshTime then //根据配置的时间回扫挂单begin MktHQRefreshTime := GetTickCount; HSGDTradeTask(con); t4 := Now; AddLog(Format('行情回扫挂单,总耗时%5.2f ms', [(t4 - t3) * MSecsPerDay ]));end;
0 0
- Delphi中GetTickCount函数的使用
- DELPHI中GetTickCount 函数的应用
- GetTickCount() 函数的使用
- GetTickCount()函数的陷阱!
- GetTickCount使用的注意事项
- linux上的GetTickCount函数
- linux上的GetTickCount函数
- 关于GetTickCount函数的用法
- Linux上的GetTickCount函数
- GetTickCount函数
- GetTickCount函数
- GetTickCount函数
- GetTickCount函数
- GetTickcount函数
- GetTickCount函数
- Delphi中分隔字符串函数的使用
- Delphi中函数指针的使用
- delphi中函数指针的使用
- react native (四)进阶应用指南
- hdu 简单计算器(栈)
- php 代码功能性技巧
- 第4章 处理用户输入与显示数据------------(读取参数、读取程序名称、测试参数)
- 【每天学点C语言】-3-指针与数组
- Delphi中GetTickCount函数的使用
- 修改tomcat默认的编码方式
- 排序算法之快速排序详解
- DG之送外卖
- 第十五周项目2-用哈希法组织关键字
- 欢迎使用CSDN-markdown编辑器
- 最短路计数
- Sublime Text2.0.2注册码
- mongodb与mysql相比的优缺点