/// Loop period in ms. If loop period = BLC_LOOP_NON_STOP the system is as fast as possible, if it is BLC_LOOP_BLOCK , it is command with return on stdin. If itis BLC_LLOP_THREAD it starts a parrallel thread to interpret command. In this latter case do not use stdin yourself.
/** Loop period in ms.
- 0 the system is as fast as possible
- -1 it blocks on keyboard
- -2 it blocks on keyboard after a first iteration*/
///Allocate and fill a command line with the array of argument. The array must be terminated by a NULL argument and must the returned command line me be freed after use.
fprintf(file,"%s: %d iterations, average duration:%.3fms[%.3f, %.3f], average frequency:%.3fHz period:%.3fms\n",blc_program_name,intermediate_iteration,blc_duration/(1000.f*intermediate_iteration),blc_duration_min/1000.,blc_duration_max/1000.,1e6*intermediate_iteration/(double)blc_period,blc_period/(1000.*intermediate_iteration));
blc_command_add(">",step_forward_cb,"|iterations","continue for steps nb iterations",NULL);
fprintf(stderr,"=== %s: pause iteration %lld === '' to continue, '>[<nb>]' to step one or run nb iterations ===\n",blc_program_name,blc_loop_iteration);
if(blc_status==BLC_RUN){//in BLC_PAUSE it is normal to block
if(iteration==blc_loop_iteration){
color_eprintf(BLC_YELLOW,"'%s' seems blocked on iteration '%d'. The loop has been stopped for more than %ds\n",blc_program_name,iteration,checking_time);
if(blc_profile_file)fflush(blc_profile_file);//It may help for debuggage
// if ((parameter) && (default_value)) EXIT_ON_ERROR("option '%s': you cannot required an parameter '%s' and having a default value '%s'", long_option, parameter, default_value);