aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-11 16:29:27 +0200
committerMattias Andrée <maandree@kth.se>2016-07-11 16:29:27 +0200
commit93c22493e847fa074d62fd7d8f7d618a19690db0 (patch)
treeb661ca450e19d3e38e04ef3802e8952ff997197b /src/util.h
parentPlace in background unless -f (diff)
downloadcoopgammad-93c22493e847fa074d62fd7d8f7d618a19690db0.tar.gz
coopgammad-93c22493e847fa074d62fd7d8f7d618a19690db0.tar.bz2
coopgammad-93c22493e847fa074d62fd7d8f7d618a19690db0.tar.xz
Create and listen to socket + do not use deprecated usleep
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/util.h11
1 files changed, 11 insertions, 0 deletions
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);
+