mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 03:48:08 +00:00
Replace gettimeofday with clock_gettime (#2159)
This commit is contained in:
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user