about summary refs log tree commit diff
path: root/src/afl-gotcpu.c
diff options
context:
space:
mode:
authorrish9101 <rranjan@cs.iitr.ac.in>2020-03-09 10:04:32 +0530
committerrish9101 <rranjan@cs.iitr.ac.in>2020-03-09 10:04:32 +0530
commit1a582d54e51eccfecb724ef04cc17cd852193b7a (patch)
treefbbde759365e2062e6990e7c180fdae2861854b9 /src/afl-gotcpu.c
parenta3161b902e36185631e624e41eb1ae04d32c302b (diff)
downloadafl++-1a582d54e51eccfecb724ef04cc17cd852193b7a.tar.gz
Remove get_cut_time function from multiple places and refactor code
Diffstat (limited to 'src/afl-gotcpu.c')
-rw-r--r--src/afl-gotcpu.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/afl-gotcpu.c b/src/afl-gotcpu.c
index 214862a9..31455b66 100644
--- a/src/afl-gotcpu.c
+++ b/src/afl-gotcpu.c
@@ -51,6 +51,7 @@
 
 #include "types.h"
 #include "debug.h"
+#include "common.h"
 
 #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
     defined(__APPLE__) || defined(__DragonFly__)
@@ -72,19 +73,6 @@
 #endif
 #endif               /* __linux__ || __FreeBSD__ || __NetBSD__ || __APPLE__ */
 
-/* Get unix time in microseconds. */
-
-static u64 get_cur_time_us(void) {
-
-  struct timeval  tv;
-  struct timezone tz;
-
-  gettimeofday(&tv, &tz);
-
-  return (tv.tv_sec * 1000000ULL) + tv.tv_usec;
-
-}
-
 /* Get CPU usage in microseconds. */
 
 static u64 get_cpu_usage_us(void) {