about summary refs log tree commit diff
path: root/custom_mutators/symqemu/symqemu.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-07-14 10:18:23 +0200
committervanhauser-thc <vh@thc.org>2024-07-14 10:18:23 +0200
commitccb952dde8dbf2165a0d84308e558cd68679fb13 (patch)
treeaa6f0c11c8fe554cc3facb3c1a76ac9ec9822594 /custom_mutators/symqemu/symqemu.c
parent7c380a6612f00e4a7ed02364dc2b3769e8edc8f8 (diff)
downloadafl++-ccb952dde8dbf2165a0d84308e558cd68679fb13.tar.gz
Revert "Replace gettimeofday with clock_gettime (#2159)"
This reverts commit 7c380a6612f00e4a7ed02364dc2b3769e8edc8f8.
Diffstat (limited to 'custom_mutators/symqemu/symqemu.c')
-rw-r--r--custom_mutators/symqemu/symqemu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/custom_mutators/symqemu/symqemu.c b/custom_mutators/symqemu/symqemu.c
index b9912923..73a1640a 100644
--- a/custom_mutators/symqemu/symqemu.c
+++ b/custom_mutators/symqemu/symqemu.c
@@ -196,11 +196,12 @@ void afl_custom_splice_optout(void *data) {
 
 inline u64 get_cur_time(void) {
 
-  struct timespec spec;
+  struct timeval  tv;
+  struct timezone tz;
 
-  clock_gettime(CLOCK_REALTIME, &spec);
+  gettimeofday(&tv, &tz);
 
-  return (spec.tv_sec * 1000ULL) + (spec.tv_nsec / 1000000ULL);
+  return (tv.tv_sec * 1000ULL) + (tv.tv_usec / 1000);
 
 }