Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 171 → Rev 172

/lab/sipmscan/trunk/src/separate_functions.cpp
165,6 → 165,37
sprintf(retEstim, "Estimated end time: %s", ctemp);
}
 
void TimeEstimateNew(int nr, clock_t stopw0, time_t time0, int rX, int rY, int rZ, int xWait, int yWait, int zWait, char *retEstim)
{
clock_t clkt1;
char ctemp[512];
double timeSec;
double averMeasTime;
 
clkt1 = clock() - stopw0;
if(nr == -1)
return;
else if(nr == 0)
averMeasTime = (double)clkt1/CLOCKS_PER_SEC;
else
averMeasTime = (averMeasTime + (double)clkt1/CLOCKS_PER_SEC)/2.0;
 
// calculate the time of one row
timeSec = rX*(xWait + averMeasTime);
// calculate the time of a surface scan
timeSec = timeSec + rY*(timeSec + yWait);
// calculate the time of a zscan
if(rZ == 1)
timeSec = timeSec + zWait;
else
timeSec = timeSec + rZ*(timeSec + zWait);
 
GetTime((int)timeSec+(int)time0, ctemp);
sprintf(retEstim, "Estimated end time: %s", ctemp);
 
printf("TimeEstimateNew(): Average time of measurement = %lf, Measurement time = %lf, Finishing time = %s\n", averMeasTime, timeSec, ctemp);
}
 
void NormateSet(int file, int nrpoint, double *min, double *max, double *setCount, double *setAcc)
{
int count = 0;