-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hrvoje Niksic wrote: > I agree that clock_getres itself isn't important. Still, Wget needs > to choose a clock that actually works out of several possible clocks > allowed by POSIX (and common extensions), so it's advisable to at > least attempt to use the clock in some way. If clock_getres is known > to fail on some platforms, then we should use clock_gettime instead.
Instead? The only time we ever use clock_getres, AFAICT, is when clock_gettime tells us zero time has elapsed. We just use clock_getres to find out the clock's resolution, and then use half that, as a midway point for guesstimating the d/l rate for downloads so quick clock_gettime couldn't clock 'em. IOW, the only time we ever use clock_getres is exactly when clock_gettime is of no use (and even clock_getres is of fairly little). > I wonder if clock_gettime works for a clock for which clock_getres > fails. Apparently, it does. Otherwise, I'd have expected OP's d/l rate to have returned nonsense values; but it appears to proceed fine. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHthDG7M8hyUobTrERAvumAJ45LcBNGqsskzNb8PcBcp4jIVRWSgCggA/L vdIIB+v5uVHTH/oFiSr88eY= =X1eA -----END PGP SIGNATURE-----
