diff --git a/mx_util.c b/mx_util.c index a159067..14741ba 100644 --- a/mx_util.c +++ b/mx_util.c @@ -594,3 +594,16 @@ int mx_open_newfile(char *fname) return fh; } + +int mx_sleep(unsigned int seconds) +{ + if (seconds) + return sleep(seconds); + return 0; +} + +int mx_sleep_nofail(unsigned int seconds) +{ + mx_sleep(seconds); + return 1; +} diff --git a/mx_util.h b/mx_util.h index f00e645..dbc50e5 100644 --- a/mx_util.h +++ b/mx_util.h @@ -43,4 +43,7 @@ int mx_setenvf_forever(const char *name, char *fmt, ...) __attribute__ ((format( int mx_open_newfile(char *fname); +int mx_sleep(unsigned int seconds); +int mx_sleep_nofail(unsigned int seconds); + #endif