Commit 78a169a5 authored by Emeric Verschuur's avatar Emeric Verschuur

--no commit message

--no commit message
parent eb45dc4b
......@@ -184,8 +184,8 @@ void LrScene::generateImage(int nbThreads)
gettimeofday(&tvInitEnd, NULL);
__getTimevalDiff(tvInitBeg,tvInitEnd,h,m,s,us);
cout << "Temps d'initialisation : " << h << " heures, " << m << " minules, "
<< s << " secondes, " << us << " microsecondes" << endl;
cout << "Temps d'initialisation :\t" << h << " h\t" << m << " m\t"
<< s << " s\t" << us/1000 << " ms\t" << us%1000 << " µs" << endl;
int nbL = m_image->getHeight();
assert(nbThreads > 0);
......@@ -208,11 +208,11 @@ void LrScene::generateImage(int nbThreads)
for( int i=0 ; i < 100 ; i++ ){
// sem_wait(&sem);
// cout << '#' << flush;
do{
while(sem_trywait(&sem)!=0){
msleep(50);
cout << (char)8 << curs[itcurs] << flush;
itcurs = (itcurs==3?0:itcurs+1);
}while(sem_trywait(&sem)!=0);
}
if(i==49){
cout << (char)8 << "#\n[.........60........70........80........90.........]\r[ " << flush;
}else{
......@@ -228,10 +228,10 @@ void LrScene::generateImage(int nbThreads)
cout << (char)8 << ']' << endl;
__getTimevalDiff(tvCalculBeg,tvCalculEnd,h,m,s,us);
cout << "Temps de calcul : " << h << " heures, " << m << " minutes, "
<< s << " secondes, " << us << " microsecondes" << endl;
cout << "Temps de calcul :\t\t" << h << " h\t" << m << " m\t"
<< s << " s\t" << us/1000 << " ms\t" << us%1000 << " µs" << endl;
__getTimevalDiff(tvInitBeg,tvCalculEnd,h,m,s,us);
cout << "Temps total : " << h << " heures, " << m << " minutes, "
<< s << " secondes, " << us << " microsecondes" << endl;
cout << "Temps total :\t\t\t" << h << " h\t" << m << " m\t"
<< s << " s\t" << us/1000 << " ms\t" << us%1000 << " µs" << endl;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment