One way would be to use the GetTickCount api call. GetTickCount returns the number of milliseconds since the machine was booted.
When your app first loads make the call. Then at any point in the future, make the call again. Second - First equals you app time in milliseconds.Code:Public Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Long
Code:Dim lRtrn1&, lRtrn2& lRtrn1=GetTickCount '/ '/... '/ lRtrn2=GetTickCount msgbox lRtrn2-lRtrn1 & " milliseconds between calls!"
td.




Reply With Quote