Maurice Lombardi wrote:
Frank Heckenbach wrote: The code in usleep.c is cl_time = _useconds * CLOCKS_PER_SEC / 977;
I should have included the explanations from usleep.txh: @node usleep, process @subheading Syntax @example #include <unistd.h> unsigned usleep(unsigned usec); @end example @subheading Description This function pauses the program for @var{usec} microseconds. Note that, since @code{usleep} calls @code{clock} internally, and the latter has a 55-msec granularity, any argument less than 55@dmn{msec} will result in a pause of random length between 0 and 55 msec. Any argument less than 11@dmn{msec} (more precisely, less than 11264 microseconds), will always result in zero-length pause (because @code{clock} multiplies the timer count by 5). @xref{clock}. @subheading Return Value The number of unslept microseconds (i.e. zero). @subheading Portability @portability !ansi, !posix @subheading Example @example usleep(500000); @end example Hope this helps Maurice -- Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 51 45 44 mailto:Maurice.Lombardi@ujf-grenoble.fr