summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67f92c4)
raw | patch | inline | side by side (parent: 67f92c4)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Oct 2013 06:59:03 +0000 (08:59 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Oct 2013 06:59:03 +0000 (08:59 +0200) |
src/utils/channel.c | patch | blob | history |
diff --git a/src/utils/channel.c b/src/utils/channel.c
index af41b477b4748252763123b8a0303aa5edc06676..8e55ae564872f1052494f78ddd62658b40d48394 100644 (file)
--- a/src/utils/channel.c
+++ b/src/utils/channel.c
abstime.tv_sec += timeout->tv_sec;
abstime.tv_nsec += timeout->tv_nsec;
+ if (abstime.tv_nsec > 1000000000) {
+ abstime.tv_nsec -= 1000000000;
+ abstime.tv_sec += 1;
+ }
+
status = pthread_cond_timedwait(&chan->cond, &chan->lock,
&abstime);
}