I want to handle files in a single folder according to their modification time. But sometimes I get undefined behavior when the underlying file system doesn't support nanoseconds - so the files created in interval of 1 millisecond have the same modification time almost always. The rare exception occurs, if this 1 millisecond passes the 1 second boundary.
Is there a way to detect the support for nanoseconds in C?