[AccessD] Resolution of Time call
Stuart McLachlan
stuart at lexacorp.com.pg
Tue Sep 27 09:15:33 CDT 2022
Hmm, Just dropped over to a PB application that plays around with timer resolution and
re-ran the VBA function. Now getting 1ms resolution on Timer
Seconds DIfference Iterations
616.828979492188 0.0009765625 2230
616.833984375 0.0009765625 9764
616.838989257813 0.0009765625 15661
616.843017578125 0.00103759765625 16176
616.846984863281 0.0009765625 19115
616.851013183594 0.00103759765625 23602
616.85498046875 0.0009765625 24125
616.859008789063 0.00103759765625 27531
616.862976074219 0.0009765625 34077
616.867004394531 0.0009765625 40258
Note: that it's just past midnight here so Timer has reset, disproving Gustav's earler
statement that:
"It returns seconds since machine launch"
It actually returns seconds since midnight, so you need to be careful with
using it to measre times that roll over to the next day
On 27 Sep 2022 at 23:59, Stuart McLachlan wrote:
> Resolution these days is a lot higher than 1/18 of a second.
>
> Testing on my laptop, it's more like 8 milliseconds.
> (If you need finer resolution, you can get 100 nanosecond resolution
> using API calls.)
>
> Here's a demo of my resolution (7.8125 milliseconds)
> ...
> Seconds DIfference Iterations
> 85405.8515625 0.0078125 53373
> 85405.859375 0.0078125 74612
> 85405.8671875 0.0078125 104048
> 85405.875 0.0078125 131782
> 85405.8828125 0.0078125 149624
> 85405.890625 0.0078125 182648
> 85405.8984375 0.0078125 214853
> 85405.90625 0.0078125 245402
> 85405.9140625 0.0078125 275054
> 85405.921875 0.0078125 301396
More information about the AccessD
mailing list