mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Add api stats (sleep time)
This commit is contained in:
parent
6e6029de99
commit
c4870676c4
@ -442,10 +442,24 @@ static bool bitforce_thread_init(struct thr_info *thr)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct api_data *bitforce_api_stats(struct cgpu_info *cgpu)
|
||||||
|
{
|
||||||
|
struct api_data *root = NULL;
|
||||||
|
|
||||||
|
// Warning, access to these is not locked - but we don't really
|
||||||
|
// care since hashing performance is way more important than
|
||||||
|
// locking access to displaying API debug 'stats'
|
||||||
|
// If locking becomes an issue for any of them, use copy_data=true also
|
||||||
|
root = api_add_int(root, "Sleep Time", &(cgpu->sleep_ms), false);
|
||||||
|
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
struct device_api bitforce_api = {
|
struct device_api bitforce_api = {
|
||||||
.dname = "bitforce",
|
.dname = "bitforce",
|
||||||
.name = "BFL",
|
.name = "BFL",
|
||||||
.api_detect = bitforce_detect,
|
.api_detect = bitforce_detect,
|
||||||
|
.get_api_stats = bitforce_api_stats,
|
||||||
.reinit_device = bitforce_init,
|
.reinit_device = bitforce_init,
|
||||||
.get_statline_before = get_bitforce_statline_before,
|
.get_statline_before = get_bitforce_statline_before,
|
||||||
.get_stats = bitforce_get_stats,
|
.get_stats = bitforce_get_stats,
|
||||||
|
Loading…
Reference in New Issue
Block a user