diff options
author | vanhauser-thc <vh@thc.org> | 2024-07-14 10:18:23 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2024-07-14 10:18:23 +0200 |
commit | ccb952dde8dbf2165a0d84308e558cd68679fb13 (patch) | |
tree | aa6f0c11c8fe554cc3facb3c1a76ac9ec9822594 /custom_mutators/symqemu/symqemu.c | |
parent | 7c380a6612f00e4a7ed02364dc2b3769e8edc8f8 (diff) | |
download | afl++-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.c | 7 |
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); } |