POV-Ray : Newsgroups : povray.unofficial.patches : MegaPov 0.4 Now Available (Windows/Macintosh) : Re: MegaPov 0.4 Now Available (Windows/Macintosh) Server Time
6 Oct 2024 09:20:55 EDT (-0400)
  Re: MegaPov 0.4 Now Available (Windows/Macintosh)  
From: Jon A  Cruz
Date: 3 Feb 2000 21:19:29
Message: <389A3834.BC740DE5@geocities.com>
Thomas Willhalm wrote:

> Chris Huff <chr### [at] yahoocom> writes:
>
> > In article <qqm### [at] schlattfmiuni-konstanzde>, Thomas
> > Willhalm <tho### [at] willhalmde> wrote:
> >
> > > In frame.h it says:
> > >     #define CLOCKDIVIDER CLK_TCK /*provided by standard c? */
> > > and as far as I know the answer is "No". According to the documentation
> > > available to me, you should use CLOCK_PER_SEC instead and include
> > > <time.h>.
> >
> > Actually, it is CLOCKS_PER_SEC. :-)
> > I don't know about whether it is standard or not, but I had to modify my
> > compile to use it instead of CLK_TCK. It took a bit of searching through
> > headers to find out about that annoying little "S".
>
> I'm sorry about wasting your time. I should have used copy'n'paste instead
> of typing.
>
> According to Plauger/Brodie "Standard C" CLOCKS_PER_SEC is standard.
> (Yes, I know that this book is from Microsoft Press, but let's assume
> that their books contain less errors than their software.)

According to the gcc time.h file, "CLK_TCK"  is "the obsolete POSIX.1-1988
name for the same constant" for "CLOCKS_PER_SEC"

And here's the bit of code they use:

/* This defines CLOCKS_PER_SEC, which is the number of processor clock
   ticks per second.  */
# include <bits/time.h>

/* This is the obsolete POSIX.1-1988 name for the same constant.  */
# ifdef __USE_POSIX
#  ifndef CLK_TCK
#   define CLK_TCK CLOCKS_PER_SEC
#  endif
# endif


--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.