From 93c22493e847fa074d62fd7d8f7d618a19690db0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 11 Jul 2016 16:29:27 +0200 Subject: Create and listen to socket + do not use deprecated usleep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/util.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 25c1a71..5941e50 100644 --- a/src/util.h +++ b/src/util.h @@ -52,3 +52,14 @@ void* nread(int fd, size_t* n); */ int dup2atleast(int fd, int atleast); + +/** + * Perform a timed suspention of the process. + * The process resumes when the timer expires, + * or when it is interrupted. + * + * @param ms The number of milliseconds to sleep, + * must be less than 1000 + */ +void msleep(int ms); + -- cgit v1.2.3-70-g09d2