|
|
|
@ -835,7 +835,7 @@ static void chat_core_collect_status(void) { |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "=== NTP ===\n"); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "=== NTP ===\n"); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Enabled: %s\n", ntp->enabled ? "yes" : "no"); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Enabled: %s\n", ntp->enabled ? "yes" : "no"); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Synced: %s\n", ntp->synced ? "yes" : "no"); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Synced: %s\n", ntp->synced ? "yes" : "no"); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Offset: %lld us\n", (long long)ntp->offset_us); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Offset: %.1f s\n", ntp->offset_us / 1000000.0); |
|
|
|
if (ntp->server_count > 0 && ntp->servers) { |
|
|
|
if (ntp->server_count > 0 && ntp->servers) { |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Servers: %d\n", ntp->server_count); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Servers: %d\n", ntp->server_count); |
|
|
|
for (int i = 0; i < ntp->server_count && ntp->servers[i]; i++) |
|
|
|
for (int i = 0; i < ntp->server_count && ntp->servers[i]; i++) |
|
|
|
@ -847,8 +847,6 @@ static void chat_core_collect_status(void) { |
|
|
|
uint64_t ago_sec = (now_tb - ntp->last_sync_tb) / 10000; |
|
|
|
uint64_t ago_sec = (now_tb - ntp->last_sync_tb) / 10000; |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Last sync: %llu sec ago\n", (unsigned long long)ago_sec); |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "Last sync: %llu sec ago\n", (unsigned long long)ago_sec); |
|
|
|
} |
|
|
|
} |
|
|
|
off += snprintf(buf + off, sizeof(buf) - off, "\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── Connections ─── */ |
|
|
|
/* ─── Connections ─── */ |
|
|
|
int conn_count = 0; |
|
|
|
int conn_count = 0; |
|
|
|
struct ll_entry* entry = g_cc.inst->connections->head; |
|
|
|
struct ll_entry* entry = g_cc.inst->connections->head; |
|
|
|
|