那就多线程,一秒时间+1,线程最高优先权
Public Const MaxValue As ULong = 18446744073709551615
成员属于: System.ULong
所以能统计上亿年(584942417355.07203243911719939117)
没试
Imports System.Threading
Public Class Test
Dim tMainRoutine As Thread
Dim abc As Uint64 = 0
Public Sub New()
tMainRoutine = New Thread(AddressOf AAA)
tMainRoutine.SetApartmentState(ApartmentState.STA)
tMainRoutine.Priority = ThreadPriority.Highest
tMainRoutine.Start()
End Sub
Public Sub StopPass()
tMainRoutine.Abort()
End Sub
Public Sub AAA()
Do
Thread.Sleep(1000)
abc +=1
If Not tMainRoutine.IsAlive Then 有人搞破坏
If abc>=??? Then ...
Loop
End Sub
ReadOnly Property GetTime() As String
Get
Return Convert.Tostring(abc \86400) & ":" & Convert.Tostring((abc \3600) mod 24) & ":" & Convert.Tostring((abc \60) mod 60) & ":" & Convert.Tostring(abc mod 60)
End Get
End Property
End Class