hi,
I am trying to write a benchmark program that takes about 20 minutes to complete because the actual functions needs to be called plenty(unknown variable) times.
but I am required to write it in such a way that the output deduces the best units to use for the elapsed time and displays the results in those units.
do I need to write an if-else for that?
(mtime>1000)?cout<<"elapsed time in seconds:"<<setprecision(8)<<mtime/1000<<" seconds\n":cout<<"elapsed time in milliseconds: "<<setprecision(3)<<mtime<<" milliseconds\n";
also, can you please tell me if mtime should be a long or int or double?