From: Alan Cox Date: Sat, 30 Jun 2018 22:11:38 +0000 (+0100) Subject: timer.c: note an optional improvement X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7a6dbfd1bb96372a33929104525592a6274a8ea2;p=FUZIX.git timer.c: note an optional improvement --- diff --git a/Kernel/timer.c b/Kernel/timer.c index 7dbb2355..00330686 100644 --- a/Kernel/timer.c +++ b/Kernel/timer.c @@ -105,6 +105,11 @@ void updatetod(void) return; slide = rtcnew - rtcsec; /* Seconds elapsed */ rtcsec = rtcnew; + /* + * FIXME: it would be nice if we see a backwards slide of 1 or 2 + * to stall the OS clock so we can use an rtc to track a not so + * stable system clock. + */ addtod: if (slide < 0) slide += 60; /* Seconds wrapped */