#include <errno.h>
#include <string.h>
#include <sys/stat.h>
+#include <sys/time.h>
using namespace std;
abort();
}
+ struct timeval start_time, current_time;
+
+ gettimeofday(&start_time, 0);
+
for(int n = 0; n < nb_sequences; n++) {
Universe *universe;
}
if((n+1)%100 == 0) {
+ gettimeofday(¤t_time, 0);
+ int estimated_remaining_time =
+ ((nb_sequences - n) * (current_time.tv_sec - start_time.tv_sec)) / n;
cout << "Created "
<< n+1 << "/" << nb_sequences << " sequences in "
<< data_dir
- << "." << endl;
+ << " (~"
+ << estimated_remaining_time/60 << "min"
+ << estimated_remaining_time%60 << "s remaining)."
+ << endl;
}
do {