206 |
|
if (!vdef(TIME) || vflt(TIME) <= FTINY) |
207 |
|
endtime = 0; |
208 |
|
else |
209 |
< |
endtime = starttime + vflt(TIME)*3600.; |
209 |
> |
endtime = starttime + vflt(TIME)*3600. + .5; |
210 |
|
/* set up memory cache */ |
211 |
|
if (outdev == NULL) |
212 |
|
hdcachesize = 0; /* manual flushing */ |
312 |
|
/* process packets */ |
313 |
|
done_packets(do_packets(pl)); |
314 |
|
return(1); /* and continue */ |
315 |
– |
} |
316 |
– |
|
317 |
– |
|
318 |
– |
report(t) /* report progress so far */ |
319 |
– |
time_t t; |
320 |
– |
{ |
321 |
– |
static time_t seconds2go = 1000000; |
322 |
– |
|
323 |
– |
if (t == 0L) |
324 |
– |
t = time(NULL); |
325 |
– |
sprintf(errmsg, "%ld packets (%ld rays) done after %.2f hours\n", |
326 |
– |
npacksdone, nraysdone, (t-starttime)/3600.); |
327 |
– |
eputs(errmsg); |
328 |
– |
if (seconds2go == 1000000) |
329 |
– |
seconds2go = vdef(REPORT) ? (long)(vflt(REPORT)*60. + .5) : 0L; |
330 |
– |
if (seconds2go) |
331 |
– |
reporttime = t + seconds2go; |
315 |
|
} |
316 |
|
|
317 |
|
|