POV-Ray : Newsgroups : povray.programming : Two possible minor bugs in pvengine.c Server Time
22 Dec 2024 17:19:32 EST (-0500)
  Two possible minor bugs in pvengine.c (Message 1 to 2 of 2)  
From: Severi Salminen
Subject: Two possible minor bugs in pvengine.c
Date: 4 Feb 2004 02:55:02
Message: <4020a556$1@news.povray.org>
If found next possible (very minor) bugs in pvengine.c

Line 665:

if (ClockTimeTotal >= 1000)

Should probably be:

if (ClockTimeTotal >= CLOCKS_PER_SEC)

This makes it more consistent on different platforms. And if CLOCKS_PER_SEC 
is defined very low, it might get a while to see the actual PPS reading :)


Line 4294:

status_printf (StatusPPS, PPS_String (pixels, ClockTimeTotal / 1000)) ;

Should probably be:

status_printf (StatusPPS, PPS_String (pixels, ClockTimeTotal / 
CLOCKS_PER_SEC)) ;

These are, of course, very minor and affect barely anything. On non-Windows 
platforms (or non Visual C++ compilers?) the PPS reading might be wrong 
when rendering is paused, if CLOCKS_PER_SEC is not 1000. Including the fix 
to 3.6 would be probably very safe - if needed to.

Severi Salminen


Post a reply to this message

From: Chris Cason
Subject: Re: Two possible minor bugs in pvengine.c
Date: 5 Feb 2004 04:49:02
Message: <4022118e@news.povray.org>
"Severi Salminen" <sev### [at] NOT_THISsibafi> wrote in message
news:4020a556$1@news.povray.org...
> status_printf (StatusPPS, PPS_String (pixels, ClockTimeTotal / 1000)) ;
>
> Should probably be:
>
> status_printf (StatusPPS, PPS_String (pixels, ClockTimeTotal /
> CLOCKS_PER_SEC)) ;

you are correct; I am inconsistent in my use of the above define (in some places I use
1000 and in others I use CLOCKS_PER_SEC).
I'll ensure it's used in all places.

-- Chris


Post a reply to this message

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