2

I would like to time sections of my code to the millisecond (perching for bottlenecks). The excel "Timer" function only has accuracy to the second and I would like accuracy to the millisecond. I found CharlesWilliams's MicroTimer code but it is dependent on some Windows DLLs so won't run in Excel for Mac.

  1. Does anyone know of similar code for the Mac?
  2. How I could create a timer function with millisecond accuracy?
braX
  • 11,506
  • 5
  • 20
  • 33
PhilNBlanks
  • 117
  • 1
  • 1
  • 8
  • Possible duplicate of [Cross Compatibility of Millisecond Timer Resolution in Excel VBA](https://stackoverflow.com/questions/7246526/cross-compatibility-of-millisecond-timer-resolution-in-excel-vba) – braX Nov 16 '19 at 15:54
  • 1
    You could create your own stopwatch class as described in this post: https://stackoverflow.com/questions/939230/how-to-get-a-datediff-value-in-milliseconds-in-vba-excel – Kevin Nov 16 '19 at 16:05

1 Answers1

0

Macros with the code example

Application.Wait (Now + 0.000001) '1/10sec
S.M. Pat
  • 308
  • 3
  • 12