I need to obtain the computation time of some parts of an algorithm I have implemented in C with NDK/JNI.
I've read this question: Android Get Current timestamp?
I think I can obtain the computation time of a JNI call using the same method in this way:
Long start, end, time;
start = System.currentTimeMillis()/1000;
//my native call
end = System.currentTimeMillis()/1000;
time = end - start;
Log.i(TAG, "Time ... (ms): " + time);
But I need to check the computation times of some small parts inside the native method. How can I do it?