Re: clock_t & return -1

2003-10-14 Thread Christopher Faylor
On Tue, Oct 14, 2003 at 02:04:39PM -0400, Igor Pechtchanski wrote: >IOW, this is not Cygwin specific. FWIW, you're welcome to submit a patch >to the cygwin-doc package. That is always a good suggestion, but this time it's not necessary. It was a newlib thing. I checked in a patch to fix it alre

Re: clock_t & return -1

2003-10-14 Thread Igor Pechtchanski
On Tue, 14 Oct 2003, Alex Vinokur wrote: > # -- man clock (fragments) -- > # RETURNS > #The amount of processor time used so far by your program, in units > #defined by the machine-dependent macro `CLOCKS_PER_SEC'. > #If no measurement is available, the result is `-

Re: clock_t & return -1

2003-10-14 Thread Cliff Hones
Alex Vinokur wrote: >... > -- Compilation -- > > $ gcc -W -Wall t.c > > t.c: In function `main': > t.c:4: warning: comparison between signed and unsigned > > - > > So, clock() is unsigned and never returns -1 (?!) You can find the definition of the type clock_t

clock_t & return -1

2003-10-14 Thread Alex Vinokur
# -- man clock (fragments) -- # NAME #`clock'--cumulative processor time # # # SYNOPSIS # include # clock_t clock(void); # # RETURNS #The amount of processor time used so far by your program, in units #defined by the machine-dependent macro `CLOCKS_P