diff options
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h index e1f0365..991d3b3 100644 --- a/src/global.h +++ b/src/global.h @@ -5,6 +5,7 @@ #include <stdio.h> #include <string.h> #include <errno.h> +#include <time.h> extern int simulate; extern int noverify; @@ -21,4 +22,6 @@ extern int verbose; #define ALLOC_ERROR() do { ERROR("Cannot allocate memory"); } while (0) #define ALLOC_ERROR_RETURN(...) do { ALLOC_ERROR(); return __VA_ARGS__; } while (0) +#define SLEEP(usec) do { struct timespec _t = { 0, (usec) }; nanosleep(&_t, NULL); } while (0) + #endif |