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

Comparing ray/src/hd/rholo2.c (file contents):
Revision 3.5 by gregl, Fri Dec 12 18:23:09 1997 UTC vs.
Revision 3.6 by gregl, Fri Dec 12 18:33:50 1997 UTC

# Line 72 | Line 72 | done_rtrace()                  /* clean up and close rtrace calculati
72                                          /* already closed? */
73          if (!nprocs)
74                  return;
75                                        /* report activity */
75          wputs("closing rtrace process...\n");
76                                          /* flush beam queue */
77          done_packets(flush_queue());
# Line 92 | Line 91 | new_rtrace()                   /* restart rtrace calculation */
91          if (nprocs > 0)                 /* already running? */
92                  return;
93          wputs("restarting rtrace process...\n");
94 +        starttime = time(NULL);         /* reset start time and counts */
95 +        npacksdone = nraysdone = 0L;
96 +        if (vdef(TIME))                 /* reset end time */
97 +                endtime = starttime + vflt(TIME)*3600. + .5;
98          if (vdef(RIF)) {                /* rerun rad to update octree */
99                  sprintf(combuf, "rad -v 0 -s -w %s", vval(RIF));
100                  if (system(combuf))
# Line 149 | Line 152 | getradfile()                   /* run rad and get needed variables */
152          }
153          rtargc += wordfile(rtargv+rtargc, tf1); /* get rtrace options */
154          unlink(tf1);                    /* clean up */
155 + }
156 +
157 +
158 + report(t)                       /* report progress so far */
159 + time_t  t;
160 + {
161 +        static time_t   seconds2go = 1000000;
162 +
163 +        if (t == 0L)
164 +                t = time(NULL);
165 +        sprintf(errmsg, "%ld packets (%ld rays) done after %.2f hours\n",
166 +                        npacksdone, nraysdone, (t-starttime)/3600.);
167 +        eputs(errmsg);
168 +        if (seconds2go == 1000000)
169 +                seconds2go = vdef(REPORT) ? (long)(vflt(REPORT)*60. + .5) : 0L;
170 +        if (seconds2go)
171 +                reporttime = t + seconds2go;
172   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines