Qt计时器可以达到2毫秒以下的精度吗求高手指点

Qt计时器可以达到2毫秒以下的精度吗求高手指点,第1张

代码修改如下:
Option Explicit
Private Declare Sub GetLocalTime 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
Dim SysTime As SYSTEMTIME
Private Sub Form_Load()
Text1Text = "00:00:00:00"
Command1Caption = "开始"
Command2Caption = "结束"
Command2Enabled = False
Timer1Interval = 1
Timer1Enabled = False
End Sub
Private Sub Command1_Click()
If Command1Caption = "开始" Then
Timer1Enabled = True
Command1Caption = "暂停"
Command2Enabled = True
ElseIf Command1Caption = "暂停" Then
Timer1Enabled = False
Command1Caption = "继续"
ElseIf Command1Caption = "继续" Then
Timer1Enabled = True
Command1Caption = "暂停"
End If
End Sub
Private Sub Command2_Click()
Timer1Enabled = False
Command2Enabled = False
Text1Text = "00:00:00:00"
Command1Caption = "开始"
Command1SetFocus
End Sub
Private Sub Timer1_Timer()
GetLocalTime SysTime
Text1Text = SysTimewHour & ":" & Format(SysTimewMinute, "0#") & ":" & Format(SysTimewSecond, "0#") & ":" & SysTimewMilliseconds
End Sub

以上就是关于Qt计时器可以达到2毫秒以下的精度吗求高手指点全部的内容,包括:Qt计时器可以达到2毫秒以下的精度吗求高手指点、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/9557196.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-29
下一篇 2023-04-29

发表评论

登录后才能评论

评论列表(0条)

保存