Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created November 30, 2018 06:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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