cout<<"\nThis test consists in creating three event handlers as follows:\n";
cout<<" Handler 1 triggers a \"function\" that prints an \"a\" every "<<period_a<<" ms;\n";
cout<<" Handler 2 triggers a \"thread\" that prints a \"b\" every "<<period_b<<" ms;\n";
cout<<" Handler 3 triggers a \"v\" on a \"semaphore\" that controls another thread that prints a \"c\" every "<<period_c<<"ms.\n";
thread_b=newThread(&func_b);
thread_c=newThread(&func_c);
cout<<"Threads B and C have been created!\n";
Function_Handlerhandler_a(&func_a);
Thread_Handlerhandler_b(thread_b);
Semaphore_Handlerhandler_c(&sem_c);
cout<<"Now the alarms will be created, along with a chronometer to keep track of the total execution time. I'll then wait for the threads to finish...\n\n";
cout<<"\n\nThread B exited with status "<<status_b
<<" and thread C exited with status "<<status_c<<"\n";
cout<<"\nThe estimated time to run the test was "<<max(period_a,period_b,period_c)*iterations<<" ms. The measured time was "<<chrono.read()/1000<<" ms!\n";