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.35 by greg, Wed Nov 24 14:28:08 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 < #define hostname  nambuf.sysname
143 >        double  period;
144 > #define hostname  nambuf.nodename
145   #endif
146  
147          tlastrept = time((time_t *)NULL);
# 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  
# Line 164 | Line 166 | report()               /* report progress */
166                          nrays, pctdone, u/3600., s/3600.,
167                          (tlastrept-tstart)/3600., hostname);
168          eputs(errmsg);
169 + #ifndef BSD
170 +        signal(SIGCONT, report);
171   #undef hostname
172 + #endif
173   }
174   #else
175   report()                /* report progress */
# Line 173 | Line 178 | report()               /* report progress */
178          sprintf(errmsg, "%lu rays, %4.2f%% after %5.4f hours\n",
179                          nrays, pctdone, (tlastrept-tstart)/3600.0);
180          eputs(errmsg);
176        signal(SIGCONT, report);
181   }
182   #endif
183  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines