diff options
-rw-r--r-- | src/libstrongswan/utils/windows.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/windows.h b/src/libstrongswan/utils/windows.h index 83a6d6253..afa524242 100644 --- a/src/libstrongswan/utils/windows.h +++ b/src/libstrongswan/utils/windows.h @@ -77,6 +77,15 @@ static inline int sched_yield(void) } /** + * Replacement of sleep(3), cancellable by thread_cancel() + */ +static inline int sleep(unsigned int seconds) +{ + SleepEx(seconds * 1000, TRUE); + return 0; +} + +/** * strdup(3), the Windows variant can't free(strdup("")) and others */ #define strdup strdup_windows |