From e5ffcd1af2acb864d92560e740a66f4385c052db Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Thu, 6 Feb 2014 21:17:32 +0100 Subject: Add option to print render time of each frame to log file Signed-off-by: Vojtech Bocek Change-Id: Id158a6375fbadf4cdf0a8c7d143759e602419e7f --- twrp-functions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'twrp-functions.cpp') diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 3f44fd2ce..df7174362 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -515,6 +515,12 @@ timespec TWFunc::timespec_diff(timespec& start, timespec& end) 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"; -- cgit v1.2.3