1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 12:34:27 +00:00

Use cgtime instead of gettimeofday in fpgautils.c

This commit is contained in:
Con Kolivas 2013-04-21 19:09:29 +10:00
parent bb964b4b99
commit 17ee0eb439

View File

@ -557,7 +557,7 @@ size_t _select_write(int fd, char *buf, size_t siz, struct timeval *timeout)
fd_set rfds;
ssize_t wrote = 0, ret;
gettimeofday(&tv_now, NULL);
cgtime(&tv_now);
timeradd(&tv_now, timeout, &tv_finish);
// timeout is the maximum time to spend trying to write
@ -576,7 +576,7 @@ size_t _select_write(int fd, char *buf, size_t siz, struct timeval *timeout)
else if (ret < 0)
return wrote;
gettimeofday(&tv_now, NULL);
cgtime(&tv_now);
}
return wrote;