It is necessary for the thread t4 to wait for the time rendering event "time = 1000 * (getTime () - time);" and after that started. How to implement? Event is needed (such a task)
// Get start time long time = getTime(); // Thread procession thread t1(process, filenames, 0); thread t2(process, filenames, 1); thread t3(process, filenames, 2); thread t4(foutput, "Time total", "", time); // Join t1.join(); t2.join(); t3.join(); // Get total time // Здесь должен быть Event time = 1000 * (getTime() - time); // Здесь должна сработать нить t4 t4.join();
join()- which is not clear when it will end. Well, understand yourtime = 1000 * (getTime() - time);- I personally miss. Explain more clearly what you want? ... - Harry