spot: Add %R, %[..]R common option.
For #189. * NEWS: Update. * bin/autfilt.cc: Replace stopwatch with process_timer. * bin/dstar2tgba.cc: Replace stopwatch with process_timer. * bin/ltl2tgba.cc: Replace stopwatch with process_timer. * bin/ltlcross.cc: Replace stopwatch with process_timer. * bin/ltldo.cc: Replace stopwatch with process_timer. * bin/randaut.cc: Replace stopwatch with process_timer. * bin/common_aoutput.hh: Implement process_timer, integrate it. * bin/common_aoutput.cc: Integrate process_timer and implement new print method. * spot/misc/timer.hh: Modify timer class and timeinfo struct i.e. add cutime (children_utime) and cstime (children_stime). * spot/misc/timer.cc: Help code to behave as before all this. * spot/twaalgos/dtbasat.cc: Help print_log to behave as before all this. * spot/twaalgos/dtwasat.cc: Help print_log to behave as before all this. * spot/misc/formater.hh: Add operator<< for spot::timer.
This commit is contained in:
parent
3eafbc823c
commit
6ed380709d
14 changed files with 277 additions and 79 deletions
13
bin/ltldo.cc
13
bin/ltldo.cc
|
|
@ -168,7 +168,7 @@ namespace
|
|||
}
|
||||
|
||||
spot::twa_graph_ptr
|
||||
translate(unsigned int translator_num, bool& problem, double& duration)
|
||||
translate(unsigned int translator_num, bool& problem, process_timer& timer)
|
||||
{
|
||||
output.reset(translator_num);
|
||||
|
||||
|
|
@ -178,10 +178,9 @@ namespace
|
|||
std::string cmd = command.str();
|
||||
//std::cerr << "Running [" << l << translator_num << "]: "
|
||||
// << cmd << std::endl;
|
||||
spot::stopwatch sw;
|
||||
sw.start();
|
||||
timer.start();
|
||||
int es = exec_with_timeout(cmd.c_str());
|
||||
duration = sw.stop();
|
||||
timer.stop();
|
||||
|
||||
spot::twa_graph_ptr res = nullptr;
|
||||
problem = false;
|
||||
|
|
@ -316,8 +315,8 @@ namespace
|
|||
for (unsigned t = 0; t < ts; ++t)
|
||||
{
|
||||
bool problem;
|
||||
double translation_time;
|
||||
auto aut = runner.translate(t, problem, translation_time);
|
||||
process_timer timer;
|
||||
auto aut = runner.translate(t, problem, timer);
|
||||
if (problem)
|
||||
{
|
||||
if (errors_opt == errors_abort)
|
||||
|
|
@ -333,7 +332,7 @@ namespace
|
|||
aut = post.run(aut, f);
|
||||
cmdname = translators[t].name;
|
||||
roundval = round;
|
||||
printer.print(aut, f, filename, linenum, translation_time,
|
||||
printer.print(aut, timer, f, filename, linenum,
|
||||
nullptr, prefix, suffix);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue