diff --git a/include/shared.h b/include/shared.h index 2c8ab99e8..9c9849423 100644 --- a/include/shared.h +++ b/include/shared.h @@ -33,9 +33,6 @@ void naive_escape (char *s, size_t s_max, const char key_char, const char escape void hc_asprintf (char **strp, const char *fmt, ...); -void hc_sleep_msec (const u32 msec); -void hc_sleep (const u32 sec); - void setup_environment_variables (void); void setup_umask (void); void setup_seeding (const bool rp_gen_seed_chgd, const u32 rp_gen_seed); diff --git a/src/monitor.c b/src/monitor.c index b4ce64e7a..256d11bd0 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -129,7 +129,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx) while (status_ctx->shutdown_inner == false) { - hc_sleep (sleep_time); + sleep (sleep_time); if (status_ctx->devices_status == STATUS_INIT) continue; diff --git a/src/opencl.c b/src/opencl.c index b1d32794e..28aa1fd1b 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -1952,7 +1952,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) { - while (status_ctx->devices_status == STATUS_PAUSED) hc_sleep (1); + while (status_ctx->devices_status == STATUS_PAUSED) sleep (1); salt_t *salt_buf = &hashes->salts_buf[salt_pos]; @@ -1983,7 +1983,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co for (u64 innerloop_pos = 0; innerloop_pos < innerloop_cnt; innerloop_pos += innerloop_step) { - while (status_ctx->devices_status == STATUS_PAUSED) hc_sleep (1); + while (status_ctx->devices_status == STATUS_PAUSED) sleep (1); u32 fast_iteration = 0; diff --git a/src/outfile_check.c b/src/outfile_check.c index c342891aa..93fce32dc 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -59,7 +59,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) while (status_ctx->shutdown_inner == false) { - hc_sleep (1); + sleep (1); if (status_ctx->devices_status != STATUS_RUNNING) continue; diff --git a/src/shared.c b/src/shared.c index 125c4c8a5..38e834727 100644 --- a/src/shared.c +++ b/src/shared.c @@ -173,24 +173,6 @@ int hc_fstat (int fd, hc_stat_t *buf) } #endif -void hc_sleep_msec (const u32 msec) -{ - #if defined (_WIN) - Sleep (msec); - #else - usleep (msec * 1000); - #endif -} - -void hc_sleep (const u32 sec) -{ - #if defined (_WIN) - Sleep (sec * 1000); - #else - sleep (sec); - #endif -} - #if defined (_WIN) #define __WINDOWS__ #endif diff --git a/src/terminal.c b/src/terminal.c index 3024b7438..b96a7c77f 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -166,7 +166,7 @@ static void keypress (hashcat_ctx_t *hashcat_ctx) user_options_t *user_options = hashcat_ctx->user_options; // this is required, because some of the variables down there are not initialized at that point - while (status_ctx->devices_status == STATUS_INIT) hc_sleep_msec (100); + while (status_ctx->devices_status == STATUS_INIT) usleep (100000); const bool quiet = user_options->quiet; diff --git a/src/thread.c b/src/thread.c index 02ac540eb..22f4cb67e 100644 --- a/src/thread.c +++ b/src/thread.c @@ -30,7 +30,7 @@ BOOL WINAPI sigHandler_default (DWORD sig) SetConsoleCtrlHandler (NULL, TRUE); - hc_sleep (10); + sleep (10); return TRUE; @@ -58,7 +58,7 @@ BOOL WINAPI sigHandler_benchmark (DWORD sig) SetConsoleCtrlHandler (NULL, TRUE); - hc_sleep (10); + sleep (10); return TRUE;