Rémi Denis-Courmont <[email protected]> writes: > Le 2014-09-09 10:48, [email protected] a écrit : >> Wouldn't it be more robust to check the return value of >> clock_gettime? >> Should give errno == EINVAL for clocks that aren't available. > > Why would it be more robust?
Because you can generate some suitable error message if the clock is missing due to some misconfiguration or other error. Always checking return values is a bit annoying, but it's usually the right thing to do. > Also, you really want to probe the clock once and use the same result > always. You could check the return value for every call, and stop using it if it fails (which clearly will be the first call, in any normal situation). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
