如何得到当前毫秒级的系统时间~!?马上给分

ketao_78 2002-09-26 12:08:55
如何得到当前毫秒级的系统时间~!?马上给分
...全文
76 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
fq1 2002-10-04
  • 打赏
  • 举报
回复
to 楼主:
声明后dim a as long
a= timeGetTime
返回的a就是当前毫秒级的系统时间了,和GetTickCount一样
danielinbiti 2002-10-04
  • 打赏
  • 举报
回复
申明后直接可以当函数用

i=timegettime()
就可以得到时间
ketao_78 2002-10-04
  • 打赏
  • 举报
回复
to fq1() :

如何使用
nik_Amis 2002-09-26
  • 打赏
  • 举报
回复
Private Declare Function GetTickCount& Lib "kernel32" ()
ZouMorn 2002-09-26
  • 打赏
  • 举报
回复
(Long)t1=GetCurrentTime()
for i=0 to 10000
next i
(long)t2=GetCurrentTime()

MyTime=t2-t1

Thank you.
By Morn
water_j 2002-09-26
  • 打赏
  • 举报
回复
OK,HEHE
water_j 2002-09-26
  • 打赏
  • 举报
回复
应该有相应的API函数
http://www.csdn.net/expert/topic/604/604732.xml?temp=.7079431
三楼の郎 2002-09-26
  • 打赏
  • 举报
回复
API函数GetSystemTime

Private Declare Sub GetSystemTime Lib "kernel32" (lpsystemtime As SYSTEMTIME)
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type

Private Sub Form_Load()
Dim lpsystemtime As SYSTEMTIME
GetSystemTime lpsystemtime
debug.print lpsystemtime.wmilliseconds
End Sub

miaoweijun 2002-09-26
  • 打赏
  • 举报
回复
同意,timeGetTime

fq1 2002-09-26
  • 打赏
  • 举报
回复
Public Declare Function timeGetTime Lib "winmm.dll" Alias "timeGetTime" () As Long
这个是最准确的!
nik_Amis 2002-09-26
  • 打赏
  • 举报
回复
The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer. To obtain the system timer resolution, use the GetSystemTimeAdjustment function.

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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