diff options
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common.h | 7 | ||||
| -rw-r--r-- | executor/common_windows.h | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/executor/common.h b/executor/common.h index 1665ef2cd..5419599da 100644 --- a/executor/common.h +++ b/executor/common.h @@ -117,17 +117,17 @@ static void install_segv_handler() #endif #if !GOOS_windows -#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT +#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT && SYZ_EXECUTOR_USES_FORK_SERVER static void sleep_ms(uint64 ms) { usleep(ms * 1000); } #endif -#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT +#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT && SYZ_EXECUTOR_USES_FORK_SERVER #include <time.h> -uint64 current_time_ms() +static uint64 current_time_ms() { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) @@ -597,7 +597,6 @@ static void loop() #else static void loop() { - (void)sleep_ms; execute_one(); } #endif diff --git a/executor/common_windows.h b/executor/common_windows.h index 1aada0933..b5520197f 100644 --- a/executor/common_windows.h +++ b/executor/common_windows.h @@ -19,14 +19,14 @@ static void install_segv_handler() } #endif -#if SYZ_EXECUTOR || SYZ_REPEAT -uint64 current_time_ms() +#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT && SYZ_EXECUTOR_USES_FORK_SERVER +static uint64 current_time_ms() { return GetTickCount64(); } #endif -#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT +#if SYZ_EXECUTOR || SYZ_THREADED || SYZ_REPEAT && SYZ_EXECUTOR_USES_FORK_SERVER static void sleep_ms(uint64 ms) { Sleep(ms); |
