Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created November 30, 2018 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DuongAQ/bbd2c20a45eac03101af929874b1ed2a to your computer and use it in GitHub Desktop.
Save DuongAQ/bbd2c20a45eac03101af929874b1ed2a to your computer and use it in GitHub Desktop.
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