Svante Signell, le Sun 29 Jun 2014 23:11:14 +0200, a écrit : > On Sun, 2014-06-29 at 22:56 +0200, Samuel Thibault wrote: > > Hello, > > > > The following simple program gives unreliable results both on Linux and > > > especially Hurd: > > > > Again, what do you mean by "unreliable"? What did you expect? > > I'd expected an elapsed time of 3 seconds with a sleep(3) in between > start and stop. That's the usage in the libsamplerate code. If it is > computer CPU time to execute the command sleep(3) the result seems > reasonable.
sleep(3) does not consume CPU, so the value returned by clock() is not supposed to increase much. You have to use a busy loop in order to consume CPU. Samuel -- To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140629212349.gb6...@type.youpi.perso.aquilenet.fr