1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

driver-ztex: react to new work in 10ms and not 250ms

This commit is contained in:
Denis Ahrens 2012-12-22 17:47:10 +01:00
parent f553c50b7b
commit 8be5da3d69

View File

@ -229,11 +229,18 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
applog(LOG_DEBUG, "%s: entering poll loop", ztex->repr);
while (!(overflow || thr->work_restart)) {
count++;
nmsleep(250);
int sleepcount = 0;
while (thr->work_restart == 0 && sleepcount < 25) {
nmsleep(10);
sleepcount += 1;
}
if (thr->work_restart) {
applog(LOG_DEBUG, "%s: New work detected", ztex->repr);
break;
}
ztex_selectFpga(ztex);
i = libztex_readHashData(ztex, &hdata[0]);
if (i < 0) {