add QCoreApplication::processEvent() to solve the GUI lagging

This commit is contained in:
Ryan Tang 2024-10-21 19:11:44 -04:00
parent 4e111085c0
commit 804fa07c9c

View File

@ -343,7 +343,7 @@ void SingleSpectra::FillHistograms(){
} }
hist2D[ID]->Fill(ch, data); hist2D[ID]->Fill(ch, data);
usleep(10); QCoreApplication::processEvents();
clock_gettime(CLOCK_REALTIME, &tb); clock_gettime(CLOCK_REALTIME, &tb);
}while( isFillingHistograms && (tb.tv_nsec - ta.tv_nsec)/1e6 + (tb.tv_sec - ta.tv_sec)*1e3 < maxFillTimeinMilliSec ); }while( isFillingHistograms && (tb.tv_nsec - ta.tv_nsec)/1e6 + (tb.tv_sec - ta.tv_sec)*1e3 < maxFillTimeinMilliSec );