railiance-clock/deploy/kernel-health.c
tegwick 9892c81ed6 Implement authenticated Railiance application clock
Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a09cbb-87c6-7900-a145-4ce53ba9f1a6
2026-09-15 22:16:23 +02:00

11 lines
426 B
C

/* Linux read-only clock discipline status. modes=0 cannot adjust the clock. */
#include <stdio.h>
#include <sys/timex.h>
int main(void) {
struct timex tx = {0};
int state = adjtimex(&tx);
if (state < 0) return 1;
printf("{\"state\":%d,\"status\":%d,\"maxerror_us\":%ld,\"esterror_us\":%ld,\"tolerance_scaled_ppm\":%ld}\n",
state, tx.status, tx.maxerror, tx.esterror, tx.tolerance);
return 0;
}