Instantly share code, notes, and snippets.

Embed
What would you like to do?
Function MicroTimer() As Double 'Xac dinh thoi gian bang milisecond
' Returns seconds.
Dim cyTicks1 As Currency
Static cyFrequency As Currency
MicroTimer = 0
' Get frequency.
If cyFrequency = 0 Then getFrequency cyFrequency
' Get ticks.
getTickCount cyTicks1
' Seconds
If cyFrequency Then MicroTimer = cyTicks1 / cyFrequency
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment