1
0
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:
Paul Sheppard 2012-07-03 10:40:02 -07:00
parent 6e6029de99
commit c4870676c4

View File

@ -442,10 +442,24 @@ static bool bitforce_thread_init(struct thr_info *thr)
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 = {
.dname = "bitforce",
.name = "BFL",
.api_detect = bitforce_detect,
.get_api_stats = bitforce_api_stats,
.reinit_device = bitforce_init,
.get_statline_before = get_bitforce_statline_before,
.get_stats = bitforce_get_stats,