From c9dd6fac39246ad5f85f617b5a35ac6a8a5bcd04 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 14 Jan 2015 21:44:14 +0100 Subject: [PATCH] system/helpers.cpp: add return value for mySleep() --- src/system/helpers.cpp | 4 ++-- src/system/helpers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 */