diff --git a/examples/wait.c b/examples/wait.c index 531489a..ae965df 100644 --- a/examples/wait.c +++ b/examples/wait.c @@ -4,7 +4,7 @@ int main() { printf("Wait 5 seconds...\n"); - wait(5); + wait(5000); return 0; } diff --git a/libs/time.h b/libs/time.h index 8e69640..33b5735 100644 --- a/libs/time.h +++ b/libs/time.h @@ -6,8 +6,8 @@ void wait(int time) { #ifdef _WIN32 - Sleep(time*1000); + Sleep(time); #else - sleep(time); + usleep(time * 1000); #endif }