Hi Louis,
+#define USER_HZ_TO_TICKSPERSEC(x) (ULONGLONG)10000000 * x / user_hz
It's poor style to assume in a macro that user_hz exists. Pass it as
a macro parameter instead.
Also, this is a question rather than a suggestion for a fix:
+ long user_hz = sysconf(_SC_CLK_TCK);
Can this value change during the lifetime of a program? I expect not,
but I could be mistaken. If not, why not make it static and
initialize it only once?
--Juan