Commit 79b044ca authored by Georg Kunz's avatar Georg Kunz

[master] correctly printing measured runtimes to logfile

parent 68da4f12
......@@ -18,6 +18,7 @@
#include <stdio.h>
#include <assert.h>
#include <fstream>
#include <iomanip>
#include <set>
#include "args.h"
......@@ -1682,7 +1683,7 @@ void EnvirBase::stopClock()
std::string filename = getConfig()->getAsString(CFGID_WRITE_RUNTIME_TO_FILENAME);
std::ofstream outfile;
outfile.open(filename.c_str(), std::ios::out | std::ios::app);
outfile << elapsedtime.tv_sec << "." << (elapsedtime.tv_usec/1000) << endl;
outfile << elapsedtime.tv_sec << "." << std::setfill('0') << std::setw(6) << elapsedtime.tv_usec << endl;
outfile.close();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment