diff options
author | Diadlo <polsha3@gmail.com> | 2017-03-03 21:30:11 +0300 |
---|---|---|
committer | Diadlo <polsha3@gmail.com> | 2017-03-25 20:40:34 +0300 |
commit | 50c526e1a5349bd69ce29dda703e914fb755ccf4 (patch) | |
tree | 52321368957f105c5db3e86fdbf7b6c47e848f7e /testing/misc_tools.c | |
parent | a1f9df48d61ccc34e35bf98c3c61ec7861e8e1b6 (diff) |
Move c_sleep to helpers.h and misc_tools.h
Also fix a mistake with forgotten braces around parameter
Diffstat (limited to 'testing/misc_tools.c')
-rw-r--r-- | testing/misc_tools.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/misc_tools.c b/testing/misc_tools.c index f0e12526..f6e76e46 100644 --- a/testing/misc_tools.c +++ b/testing/misc_tools.c | |||
@@ -31,6 +31,15 @@ | |||
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | #include <string.h> | 32 | #include <string.h> |
33 | 33 | ||
34 | //Sleep function (x = milliseconds) | ||
35 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) | ||
36 | #include <windows.h> | ||
37 | #define c_sleep(x) Sleep(x) | ||
38 | #else | ||
39 | #include <unistd.h> | ||
40 | #define c_sleep(x) usleep(1000*(x)) | ||
41 | #endif | ||
42 | |||
34 | // You are responsible for freeing the return value! | 43 | // You are responsible for freeing the return value! |
35 | uint8_t *hex_string_to_bin(const char *hex_string) | 44 | uint8_t *hex_string_to_bin(const char *hex_string) |
36 | { | 45 | { |