struct timespec.tv_nsec is implementation-specific (even if the doc says it is c_long). For example, on x32 it is i64. Do not explicitly cast nsec value to c_long, use whatever type needed for the target type. This also simplifies the code (avoiding temporary variable).
struct timespec.tv_nsec is implementation-specific (even if the doc says it is c_long). For example, on x32 it is i64. Do not explicitly cast nsec value to c_long, use whatever type needed for the target type. This also simplifies the code (avoiding temporary variable).