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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -