Lead time
Posted: Sun May 04, 2025 4:18 pm
How to find out the time of execution of a piece of code? You can read the current time and time after the event, but this is second () seconds. And I need to at milisecond!?
Code: Select all
ElapsedMilliseconds()
Code: Select all
Global time = ElapsedMilliseconds()
; do some processing
time = ElapsedMilliseconds() - time
Not quite, ElapsedMilliseconds() returns a quad variable type (.q) otherwise it will not work on 32-bit systems.Axolotl wrote: Sun May 04, 2025 4:48 pm Use it like this (with disabled Debugger):Code: Select all
Global time = ElapsedMilliseconds() ; do some processing time = ElapsedMilliseconds() - time
Code: Select all
Global time.q = ElapsedMilliseconds()