Add option to print render time of each frame to log file
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
Change-Id: Id158a6375fbadf4cdf0a8c7d143759e602419e7f
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 3f44fd2..df71743 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -515,6 +515,12 @@
return temp;
}
+int32_t TWFunc::timespec_diff_ms(timespec& start, timespec& end)
+{
+ return ((end.tv_sec * 1000) + end.tv_nsec/1000000) -
+ ((start.tv_sec * 1000) + start.tv_nsec/1000000);
+}
+
int TWFunc::drop_caches(void) {
string file = "/proc/sys/vm/drop_caches";
string value = "3";