class test: public QThread /*, ...*/{ /*...*/ private static QMutex mutex1; /*...*/}int test::time_test_2(int time_okonch,QString file_name,FT_HANDLE ftHandle1,QString serial,int tes){ /*...*/ test::mutex1.lock(); /*...*/ test::mutex1.unlock(); /*...*/}
t3 = test::time_test_2(time_okonch_,file_name_,ftHandle1_,serial_,t3); if (t3==true) { emit mysignal_win(serial_); }
int t3=0;/*...*/while(t3<=time_okonch_){ t3 = test::time_test_2(time_okonch_,file_name_,ftHandle1_,serial_,t3);}if(t3>=time_okonch_){ emit signal_win(serial_);}else{ emit signal_fail2(serial_);}/*...*/
nt test::time_test_2(int time_okonch,QString file_name,FT_HANDLE ftHandle1,QString serial,int tes) { mutex1.lock(); QString nms = "0"; QTime time_konca; int vremia_t=tes; time_okonch=(time_okonch)*1000; time_konca.start(); nms= test::ReadWrite(serial,nms,file_name,ftHandle1); vremia_t=time_konca.elapsed(); mutex1.unlock(); return vremia_t/1000; }