From 33bb8c795818e1e1acfa308f77114910a6b6b9db Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 18 Aug 2013 00:28:30 +1000 Subject: [PATCH] Use the us_to_timeval helper function in the avalon driver. --- driver-avalon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index 8fca3502..728e316f 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -1300,8 +1300,7 @@ static int64_t avalon_scanhash(struct thr_info *thr) /* Half nonce range */ us_timeout = 0x80000000ll / info->asic_count / info->frequency; - tdiff.tv_sec = us_timeout / 1000000; - tdiff.tv_usec = us_timeout - (tdiff.tv_sec * 1000000); + us_to_timeval(&tdiff, us_timeout); cgtime(&now); timeradd(&now, &tdiff, &then); timeval_to_spec(&abstime, &then);