我需要很很很很的计算时间,还有没有什么其它更好的办法,谢谢大家
解决方案 »
- 生成后的EXE 退出后进程里还有
- mscomm给猫发at指令
- 求个定时器程序,很简单的就可以
- WORD里录了几个宏,在工具栏里加了几个图标,但每次重装都要重新设,很麻烦,如何能做个可以自动安装的东西,编程也行
- 在MSHFlexGrid这个控件中,当我没有选中任何记录时,该控件缺省选中的是第1条记录(即row=1),这在使用中很不方便。如何才能使得在我没
- 请教点击vb窗口右上角的X,是什么事件?
- 怎样可以打印不同表的内容?
- 哪里可以下载DirectX8的SDK? 最好是中文的
- 错误
- 谁知道Combobox控件怎么用?怎么给他的LIST里设初值?(部件里FORM2.0里那个)
- 其实不能算是VB的问题,但大家能不能帮我看看
- 一个小要求,大散分啦!
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Private Sub Command1_Click()
Dim t As Long
Dim i As Long
t = timeGetTime
While timeGetTime - t <= 10000
i = i + 1
Wend
Debug.Print i
i = 0
t = GetTickCount
While GetTickCount - t <= 10000
i = i + 1
Wend
Debug.Print i
End Sub
------------------
呵呵,不是看一秒多少次的,你运行下看看吧。那个准我也不会看。
Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Any) As Longdim curFrequency as currency
dim curStart as currency
dim curEnd as currencyQueryPerformanceFrequency curFrequency
QueryPerformanceCounter curStart
需要记时的代码
QueryPerformanceCounter curEnd
Debug.print "用时:" & (curEnd - curStart) / curFrequency & "秒"
dttime=dtTime+(dbltimer-fix(dbltime))/86400'''Unit of Day当前时间,精确到1ms,与系统时间完全一样!