mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-09 13:34:18 +00:00
Store when the last getwork was retrieved and display it in the API summary.
This commit is contained in:
parent
d1e2bfaf7f
commit
c31de2601b
1
api.c
1
api.c
@ -1920,6 +1920,7 @@ static void summary(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __mayb
|
||||
double stalep = (total_diff_accepted + total_diff_rejected + total_diff_stale) ?
|
||||
(double)(total_diff_stale) / (double)(total_diff_accepted + total_diff_rejected + total_diff_stale) : 0;
|
||||
root = api_add_percent(root, "Pool Stale%", &stalep, false);
|
||||
root = api_add_time(root, "Last getwork", &last_getwork, false);
|
||||
|
||||
mutex_unlock(&hash_lock);
|
||||
|
||||
|
1
miner.h
1
miner.h
@ -976,6 +976,7 @@ extern int opt_api_port;
|
||||
extern bool opt_api_listen;
|
||||
extern bool opt_api_network;
|
||||
extern bool opt_delaynet;
|
||||
extern time_t last_getwork;
|
||||
extern bool opt_restart;
|
||||
extern bool opt_worktime;
|
||||
extern int swork_id;
|
||||
|
@ -95,6 +95,7 @@ int opt_expiry = 28;
|
||||
static const bool opt_time = true;
|
||||
unsigned long long global_hashrate;
|
||||
unsigned long global_quota_gcd = 1;
|
||||
time_t last_getwork;
|
||||
|
||||
int nDevs;
|
||||
int opt_dynamic_interval = 7;
|
||||
@ -5899,6 +5900,7 @@ struct work *get_work(struct thr_info *thr, const int thr_id)
|
||||
wake_gws();
|
||||
}
|
||||
}
|
||||
last_getwork = time(NULL);
|
||||
applog(LOG_DEBUG, "Got work from get queue to get work for thread %d", thr_id);
|
||||
|
||||
work->thr_id = thr_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user