mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-20 21:25:43 +00:00
code format
This commit is contained in:
@ -994,27 +994,35 @@ void read_bitmap(u8 *fname, u8 *map, size_t len) {
|
||||
/* Get unix time in milliseconds */
|
||||
|
||||
inline u64 get_cur_time(void) {
|
||||
|
||||
struct timespec ts;
|
||||
int rc = clock_gettime(CLOCK_MONOTONIC_COARSE, &ts);
|
||||
if (rc == -1) {
|
||||
PFATAL("Failed to obtain timestamp (errno = %i: %s)\n",
|
||||
errno, strerror(errno));
|
||||
|
||||
PFATAL("Failed to obtain timestamp (errno = %i: %s)\n", errno,
|
||||
strerror(errno));
|
||||
|
||||
}
|
||||
|
||||
return SEC_TO_MS((uint64_t)ts.tv_sec) + NS_TO_MS((uint64_t)ts.tv_nsec);
|
||||
|
||||
}
|
||||
|
||||
/* Get unix time in microseconds */
|
||||
|
||||
u64 get_cur_time_us(void) {
|
||||
|
||||
struct timespec ts;
|
||||
int rc = clock_gettime(CLOCK_MONOTONIC_COARSE, &ts);
|
||||
if (rc == -1) {
|
||||
PFATAL("Failed to obtain timestamp (errno = %i: %s)\n",
|
||||
errno, strerror(errno));
|
||||
|
||||
PFATAL("Failed to obtain timestamp (errno = %i: %s)\n", errno,
|
||||
strerror(errno));
|
||||
|
||||
}
|
||||
|
||||
return SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec);
|
||||
|
||||
}
|
||||
|
||||
/* Describe integer. The buf should be
|
||||
|
Reference in New Issue
Block a user