From 7c645ffda9be431c82b1fc7d1a158bdf4b4d594b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 28 May 2013 23:02:29 +1000 Subject: [PATCH] Use nusleep in avalon_get_results in place of nmsleep. --- driver-avalon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index 2023f60f..706b9f18 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -776,13 +776,13 @@ static void *avalon_get_results(void *userdata) pthread_setcanceltype(PTHREAD_CANCEL_ENABLE, NULL); if (ret < 1) { - int ms_delay; + int us_delay; cgtime(&now); timersub(&now, &tv_start, &tdiff); - ms_delay = AVALON_READ_TIMEOUT - (tdiff.tv_usec / 1000); - if (ms_delay > 0) - nmsleep(ms_delay); + us_delay = AVALON_READ_TIMEOUT * 1000 - (tdiff.tv_usec); + if (us_delay > 0) + nusleep(us_delay); continue; }