summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-02-07 19:46:59 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-07 19:46:59 +0100
commit3b2be98ca45a6c6f50b8d68cfafd5509c40d670d (patch)
tree0c717c6345b33d79ecb06348c45b439feaa65a00 /twrp-functions.cpp
parentMerge "Restore contexts when doing mkdierhier in libtar Do a restore of loaded file contexts to /data/media directory. This will help denials to be prevented when internal storage is wiped." into android-4.4 (diff)
parentAdd option to print render time of each frame to log file (diff)
downloadandroid_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.tar
android_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.tar.gz
android_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.tar.bz2
android_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.tar.lz
android_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.tar.xz
android_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.tar.zst
android_bootable_recovery-3b2be98ca45a6c6f50b8d68cfafd5509c40d670d.zip
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r--twrp-functions.cpp6
1 files changed, 6 insertions, 0 deletions
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";