Lines Matching refs:when

26 the timing when writing to the terminal (because of line buffered output from
27 C); it is useful only when debugging the source. Note that the times produced
233 double dispersion, weight, when, offset, error;
402 when this is clearly misguided, except possibly for the setting of LI. It
693 double weight, disp, when, offset, error, drift, drifterr,
701 record[i].when += correction;
706 record[index].when = *a_when;
709 fprintf(stderr,"%s: corr=%.3f when=%.3f disp=%.3f off=%.3f",
743 disp = weight = when = offset = y = 0.0;
746 when += w*record[i].when;
752 when /= weight;
756 fprintf(stderr,"disp=%.6f wgt=%.3f when=%.6f off=%.6f\n",
757 disp,weight,when,offset);
765 x += w*(record[i].when-when)*(record[i].when-when);
766 drift += w*(record[i].when-when)*(record[i].offset-offset);
846 x = now-when;
850 x = now-record[i].when;
853 when = record[i].when;
859 fprintf(stderr,"now=%.6f when=%.6f off=%.6f err=%.6f wait=%d\n",
860 now,when,offset,error,wait);
865 *a_when = when;
880 discrepancy, when appropriate. */
904 data_record *record, double *previous, double *when, double *correction) {
908 paranoia, check everything in sight when restoring. Note that this function
913 double previous, when, correction;
934 fprintf(stderr,"Reading prev=%.6f when=%.6f corr=%.6f\n",
935 buffer.previous,buffer.when,buffer.correction);
942 "disp=%.6f wgt=%.3f when=%.6f off=%.6f err=%.6f\n",
944 buffer.record[i].when,buffer.record[i].offset,
970 buffer.waiting > delay || buffer.previous > buffer.when ||
971 buffer.previous < buffer.when-count*delay ||
972 buffer.when >= *when) {
980 x = *when;
995 if (buffer.record[i].when < x) x = buffer.record[i].when;
996 if (buffer.record[i].when > y) y = buffer.record[i].when;
1001 if (y > buffer.when || y-x < (buffer.total-1)*delay ||
1007 if (buffer.when < *when-count*delay) {
1018 *when = buffer.when;
1029 fprintf(stderr,"%s: prev=%.3f when=%.3f corr=%.3f\n",
1030 argv0,*previous,*when,*correction);
1033 fprintf(stderr,"%s: when=%.3f disp=%.3f off=%.3f",
1034 argv0,record[j].when,record[j].dispersion,record[j].offset);
1047 buffer.when = *when;
1061 fprintf(stderr,"Writing prev=%.6f when=%.6f corr=%.6f\n",
1062 *previous,*when,*correction);
1068 "disp=%.6f wgt=%.3f when=%.6f off=%.6f err=%.6f\n",
1070 record[i].when,record[i].offset,record[i].error);
1090 double previous, when, correction = 0.0, offset = 0.0, error = -1.0,
1098 previous = when = current_time(JAN_1970);
1101 fprintf(stderr,"Started=%.6f %s\n",when,text);
1103 handle_saving(save_read_only,&total,&index,&cycle,record,&previous,&when,
1106 &when,&offset,&error,&drift,&drifterr,&waiting,0);
1127 double history[COUNT_MAX], started, previous, when, correction = 0.0,
1142 started = previous = when = current_time(JAN_1970);
1145 fprintf(stderr,"Started=%.6f %s\n",when,text);
1149 &previous,&when,&correction);
1156 fprintf(stderr,"prev=%.6f when=%.6f retry=%d\n",
1157 previous,when,retry);
1213 correction += correct_drift(&when,&offset,drift);
1215 &previous,&when,&correction);
1234 when = data.current;
1235 if (! retry && when < previous+delay) {
1243 offset,when,dispersion);
1277 when = (data.originate+data.current)/2.0;
1279 correction += correct_drift(&when,&offset,drift);
1281 &previous,&when,&correction);
1283 if (! k && ! retry && when < previous+delay-2) {
1312 offset,error,when,dispersion);
1319 care should be taken when modifying it. Also, we want to clear the saved state
1322 handle_saving(save_clear,&total,&index,&cycle,record,&previous,&when,
1326 previous = when =
1328 &when,&offset,&error,&drift,&drifterr,&waiting,1);
1330 fprintf(stderr,"tot=%d ind=%d dis=%.3f when=%.3f off=%.3f ",
1331 total,index,dispersion,when,offset);
1334 if (when == 0.0) return;
1349 handle_saving(save_write,&total,&index,&cycle,record,&previous,&when,
1355 while (when < previous+delay-waiting) {
1358 when += waiting;
1360 correction += correct_drift(&when,&offset,drift);
1362 &previous,&when,&correction);