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.7 by gregl, Fri Dec 12 19:52:32 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());
78 +                                        /* sync holodeck */
79 +        hdsync(NULL, 1);
80                                          /* close rtrace */
81          if ((status = end_rtrace()))
82                  error(WARNING, "bad exit status from rtrace");
# Line 92 | Line 93 | new_rtrace()                   /* restart rtrace calculation */
93          if (nprocs > 0)                 /* already running? */
94                  return;
95          wputs("restarting rtrace process...\n");
96 +        starttime = time(NULL);         /* reset start time and counts */
97 +        npacksdone = nraysdone = 0L;
98 +        if (vdef(TIME))                 /* reset end time */
99 +                endtime = starttime + vflt(TIME)*3600. + .5;
100          if (vdef(RIF)) {                /* rerun rad to update octree */
101                  sprintf(combuf, "rad -v 0 -s -w %s", vval(RIF));
102                  if (system(combuf))
# Line 149 | Line 154 | getradfile()                   /* run rad and get needed variables */
154          }
155          rtargc += wordfile(rtargv+rtargc, tf1); /* get rtrace options */
156          unlink(tf1);                    /* clean up */
157 + }
158 +
159 +
160 + report(t)                       /* report progress so far */
161 + time_t  t;
162 + {
163 +        static time_t   seconds2go = 1000000;
164 +
165 +        if (t == 0L)
166 +                t = time(NULL);
167 +        sprintf(errmsg, "%ld packets (%ld rays) done after %.2f hours\n",
168 +                        npacksdone, nraysdone, (t-starttime)/3600.);
169 +        eputs(errmsg);
170 +        if (seconds2go == 1000000)
171 +                seconds2go = vdef(REPORT) ? (long)(vflt(REPORT)*60. + .5) : 0L;
172 +        if (seconds2go)
173 +                reporttime = t + seconds2go;
174   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines