android - Equivalent of System.nanoTime() for NDK apps? -
my android ndk c++ application receives touch events , uses amotionevent_geteventtime()
time of touch event. need compare time time values sample on own during app execution. function docs gives time "in java.lang.system.nanotime() time base", need have equivalent of call in c++ code.
best clue got clock_gettime(clock_monotonic)
that?
found implementation of system.nanotime:
https://github.com/android-ia/platform_libcore/blob/master/luni/src/main/native/java_lang_system.cpp
Comments
Post a Comment