How to measure little time intervals?

Put your problem here if it does not fit any of the other categories.

How to measure little time intervals?

Postby dulceangustia » Mon Sep 17, 2012 5:29 pm

Hi there!

I would like to make an app that measures little time intervals (nanoseconds) so I need to know about time resolution and precision regarding such measures with an Android device.

In other words:

- Is it feasible to get reliable values of the current time with nanosecond resolution?
- If so, is feasible to measure such little time interavals? I mean, is there any way to tell the app/OS to focus on measuring the time interval specified in the current thread instead of allowing other processes to make the measuring task not precise?

I've tried to measure the time between the execution of two different lines in code but the results are not always the same, somehow random, then I suppose Dalvik and its process management is causing this to be unreliable and random. What I need to do is to measure distances by getting transmission and reception of audio tones of 16-20 KHz (done here with iOS), thus needing resolution and precision. I don't know if there is any way to get this working or do I need to get into JNI or what @_@.

Anyway, does anybody have any idea about this?

Thanks in advance!!
Once Poster
Once Poster
Posts: 1
Joined: Mon Sep 17, 2012 5:26 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], MSNbot Media and 25 guests