[ANativeWindow] Increase precision for duration queries.
Use perform() instead in query() to retrieve dequeue/queue durations for
nanosecond resolution.
Bug: 137012798
Test: atest
Change-Id: I894a8784f3321d4ab6f538d7e7fc1457de26f289
diff --git a/libs/nativewindow/include/apex/window.h b/libs/nativewindow/include/apex/window.h
index 9798c2f..869b22e 100644
--- a/libs/nativewindow/include/apex/window.h
+++ b/libs/nativewindow/include/apex/window.h
@@ -27,17 +27,17 @@
* Retrieves how long it took for the last time a buffer was dequeued.
*
* \return a negative value on error, otherwise returns the duration in
- * microseconds.
+ * nanoseconds
*/
-int ANativeWindow_getLastDequeueDuration(ANativeWindow* window);
+int64_t ANativeWindow_getLastDequeueDuration(ANativeWindow* window);
/**
* Retrieves how long it took for the last time a buffer was queued.
*
* \return a negative value on error, otherwise returns the duration in
- * microseconds
+ * nanoseconds.
*/
-int ANativeWindow_getLastQueueDuration(ANativeWindow* window);
+int64_t ANativeWindow_getLastQueueDuration(ANativeWindow* window);
/**
* Retrieves the system time in nanoseconds when the last time a buffer