Set the bitfury device start times from when we first get valid work.
diff --git a/driver-bitfury.c b/driver-bitfury.c
index fb6d44a..7181488 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -355,7 +355,11 @@ static void parse_bxf_submit(struct cgpu_info *bitfury, struct bitfury_info *inf
inc_hw_errors(thr);
return;
}
- info->valid = true;
+ /* Set the device start time from when we first get valid results */
+ if (unlikely(!info->valid)) {
+ info->valid = true;
+ cgtime(&bitfury->dev_start_tv);
+ }
set_work_ntime(work, timestamp);
if (submit_nonce(thr, work, nonce)) {
mutex_lock(&info->lock);
@@ -617,8 +621,10 @@ out:
if (!found) {
if (likely(info->valid))
inc_hw_errors(thr);
- } else
+ } else if (unlikely(!info->valid)) {
info->valid = true;
+ cgtime(&bitfury->dev_start_tv);
+ }
}
cgtime(&tv_now);