summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index ab9afcc..e06fc62 100644
--- a/util.c
+++ b/util.c
@@ -52,8 +52,8 @@ ssize_t read_with_timeout (int fd, void *_b, size_t len, unsigned timeout)
fd_set rfds;
ssize_t red, ret = 0;
- tv.tv_sec = timeout / 10;
- tv.tv_usec = (timeout % 10) * 100000;
+ tv.tv_sec = timeout / 100;
+ tv.tv_usec = (timeout % 100) * 10000;
while (tv.tv_sec || tv.tv_usec) {
FD_ZERO (&rfds);