mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-10 05:54:21 +00:00
Use cgtime in driver-avalon.c
This commit is contained in:
parent
79df6b9f79
commit
849567cb35
@ -38,6 +38,7 @@
|
|||||||
#include "fpgautils.h"
|
#include "fpgautils.h"
|
||||||
#include "driver-avalon.h"
|
#include "driver-avalon.h"
|
||||||
#include "hexdump.c"
|
#include "hexdump.c"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
static int option_offset = -1;
|
static int option_offset = -1;
|
||||||
struct avalon_info **avalon_infos;
|
struct avalon_info **avalon_infos;
|
||||||
@ -235,7 +236,7 @@ static inline int avalon_gets(int fd, uint8_t *buf, struct thr_info *thr,
|
|||||||
return AVA_GETS_ERROR;
|
return AVA_GETS_ERROR;
|
||||||
}
|
}
|
||||||
if (likely(first)) {
|
if (likely(first)) {
|
||||||
gettimeofday(tv_finish, NULL);
|
cgtime(tv_finish);
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
if (likely(ret >= read_amount))
|
if (likely(ret >= read_amount))
|
||||||
@ -677,7 +678,7 @@ static bool avalon_prepare(struct thr_info *thr)
|
|||||||
else
|
else
|
||||||
__avalon_init(avalon);
|
__avalon_init(avalon);
|
||||||
|
|
||||||
gettimeofday(&now, NULL);
|
cgtime(&now);
|
||||||
get_datestamp(avalon->init, &now);
|
get_datestamp(avalon->init, &now);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -877,7 +878,7 @@ static int64_t avalon_scanhash(struct thr_info *thr)
|
|||||||
first_try = 0;
|
first_try = 0;
|
||||||
|
|
||||||
elapsed.tv_sec = elapsed.tv_usec = 0;
|
elapsed.tv_sec = elapsed.tv_usec = 0;
|
||||||
gettimeofday(&tv_start, NULL);
|
cgtime(&tv_start);
|
||||||
|
|
||||||
result_wrong = 0;
|
result_wrong = 0;
|
||||||
hash_count = 0;
|
hash_count = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user