ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rpict.c
(Generate patch)

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.32 by greg, Mon Nov 22 09:34:15 1993 UTC vs.
Revision 2.33 by greg, Tue Nov 23 09:56:31 1993 UTC

# Line 21 | Line 21 | static char SCCSid[] = "$SunId$ LBL";
21   #else
22   #include  <sys/times.h>
23   #include  <sys/utsname.h>
24 < #include  <limits.h>
24 > #include  <unistd.h>
25   #endif
26   #endif
27  
# Line 140 | Line 140 | report()               /* report progress */
140   #else
141          struct tms  tbuf;
142          struct utsname  nambuf;
143 +        double  period;
144   #define hostname  nambuf.sysname
145   #endif
146  
# Line 154 | Line 155 | report()               /* report progress */
155          gethostname(hostname, sizeof(hostname));
156   #else
157          times(&tbuf);
158 <        u = ( tbuf.tms_utime + tbuf.tms_cutime ) / CLK_TCK;
159 <        s = ( tbuf.tms_stime + tbuf.tms_cstime ) / CLK_TCK;
158 >        period = 1.0 / sysconf(_SC_CLK_TCK);
159 >        u = ( tbuf.tms_utime + tbuf.tms_cutime ) * period;
160 >        s = ( tbuf.tms_stime + tbuf.tms_cstime ) * period;
161          uname(&nambuf);
162   #endif
163  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines