diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index f878eb7b3..abdaeb1a3 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -47,12 +47,12 @@ #include using namespace std; -void mySleep(int sec) { +int mySleep(int sec) { struct timeval timeout; timeout.tv_sec = sec; timeout.tv_usec = 0; - select(0,0,0,0, &timeout); + return select(0,0,0,0, &timeout); } off_t file_size(const char *filename) diff --git a/src/system/helpers.h b/src/system/helpers.h index b9074331b..2f7b51137 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -52,7 +52,7 @@ void wakeup_hdd(const char *hdd_dir); int check_dir(const char * dir, bool allow_tmp = false); bool get_fs_usage(const char * dir, uint64_t &btotal, uint64_t &bused, long *bsize=NULL); bool get_mem_usage(unsigned long &total, unsigned long &free); -void mySleep(int sec); +int mySleep(int sec); std::string find_executable(const char *name); /* basically what "foo=`command`" does in the shell */