about summary refs log tree commit diff
path: root/custom_mutators/symqemu/symqemu.c
diff options
context:
space:
mode:
authorcarpintero-de-c <175505615+carpintero-de-c@users.noreply.github.com>2024-07-14 03:55:58 +0530
committerGitHub <noreply@github.com>2024-07-14 00:25:58 +0200
commit7c380a6612f00e4a7ed02364dc2b3769e8edc8f8 (patch)
treefd78a050b4fa1372f6d023f10f3513a76e1ee769 /custom_mutators/symqemu/symqemu.c
parent3f26818d973c4929857977b7cdfcf26cc0a84eb3 (diff)
downloadafl++-7c380a6612f00e4a7ed02364dc2b3769e8edc8f8.tar.gz
Replace gettimeofday with clock_gettime (#2159)
Diffstat (limited to 'custom_mutators/symqemu/symqemu.c')
-rw-r--r--custom_mutators/symqemu/symqemu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/custom_mutators/symqemu/symqemu.c b/custom_mutators/symqemu/symqemu.c
index 73a1640a..b9912923 100644
--- a/custom_mutators/symqemu/symqemu.c
+++ b/custom_mutators/symqemu/symqemu.c
@@ -196,12 +196,11 @@ void afl_custom_splice_optout(void *data) {
 
 inline u64 get_cur_time(void) {
 
-  struct timeval  tv;
-  struct timezone tz;
+  struct timespec spec;
 
-  gettimeofday(&tv, &tz);
+  clock_gettime(CLOCK_REALTIME, &spec);
 
-  return (tv.tv_sec * 1000ULL) + (tv.tv_usec / 1000);
+  return (spec.tv_sec * 1000ULL) + (spec.tv_nsec / 1000000ULL);
 
 }