summaryrefslogtreecommitdiffstats
path: root/polyp/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/util.c')
-rw-r--r--polyp/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/polyp/util.c b/polyp/util.c
index 0b459ddc..970ebb93 100644
--- a/polyp/util.c
+++ b/polyp/util.c
@@ -861,3 +861,12 @@ char *pa_runtime_path(const char *fn, char *s, size_t l) {
snprintf(s, l, PA_RUNTIME_PATH_PREFIX"%s%s%s", pa_get_user_name(u, sizeof(u)), fn ? "/" : "", fn ? fn : "");
return s;
}
+
+int pa_msleep(unsigned long t) {
+ struct timespec ts;
+
+ ts.tv_sec = t/1000;
+ ts.tv_nsec = (t % 1000) * 1000000;
+
+ return nanosleep(&ts, NULL);
+}