mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
webui: last block found fix for none
This commit is contained in:
parent
ce734bac92
commit
99db5072b1
1 changed files with 3 additions and 1 deletions
|
@ -103,7 +103,9 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
|
|||
|
||||
time_t now = time(NULL);
|
||||
double diff = difftime(now, context->pool_stats->last_block_found);
|
||||
if (diff < 60)
|
||||
if (context->pool_stats->last_block_found == 0)
|
||||
snprintf(temp, TAG_MAX, "None yet");
|
||||
else if (diff < 60)
|
||||
snprintf(temp, TAG_MAX, "%d seconds ago", (int) diff);
|
||||
else if (diff < 3600)
|
||||
snprintf(temp, TAG_MAX, "%d minutes ago", (int) diff / 60);
|
||||
|
|
Loading…
Reference in a new issue