Hello all,
I need to do some high resolution timing. Milliseconds resolution is not enough, I need microseconds or nanoseconds.
I found the Android Java routine:
java.lang.System
nanoTime()
This would be great for measuring elapsed time.
I am using the Reflector library to access this function - essentially using the Reflector method:
curtm = refl.RunStaticMethod("java.lang.System", "nanoTime", Null, Null)
In the Reflector docs, I see mention of the word "inefficient". Is this a good way to access the nanoTime() function from B4A? I think I may be encountering a lot of overhead with this function call.
Is there a better way with or without using the Reflector library?
I need timing resolution of this order - microseconds or nanoseconds.
Thanks,
Barry.
I need to do some high resolution timing. Milliseconds resolution is not enough, I need microseconds or nanoseconds.
I found the Android Java routine:
java.lang.System
nanoTime()
This would be great for measuring elapsed time.
I am using the Reflector library to access this function - essentially using the Reflector method:
curtm = refl.RunStaticMethod("java.lang.System", "nanoTime", Null, Null)
In the Reflector docs, I see mention of the word "inefficient". Is this a good way to access the nanoTime() function from B4A? I think I may be encountering a lot of overhead with this function call.
Is there a better way with or without using the Reflector library?
I need timing resolution of this order - microseconds or nanoseconds.
Thanks,
Barry.