ALFRED_INTERVAL is now externalized via the -p option (synchronization period). If specified as option, user supplied interval is used, otherwise the default interval of ALFRED_INTERVAL is used.
[...]
--- a/server.c +++ b/server.c @@ -372,7 +372,7 @@ int alfred_server(struct globals *globals)
while (1) { clock_gettime(CLOCK_MONOTONIC, &now);
now.tv_sec -= ALFRED_INTERVAL;
time_diff(&now, &globals->sync_period, &now);
I believe this at least deserves a comment, or must be made more clear in the code.
This change simply does exactly what the previous code did - subtracts the interval from the current time. It utilizes the existing time_diff() routine to account for nanoseconds.
If you need me to resubmit with that language in the commit text or in a C comment, I can do that.
Thanks!