more use of fmtlib and std::string
This commit is contained in:
@ -667,15 +667,12 @@ LAMMPS::~LAMMPS()
|
||||
|
||||
double totalclock = MPI_Wtime() - initclock;
|
||||
if ((me == 0) && (screen || logfile)) {
|
||||
char outtime[128];
|
||||
int seconds = fmod(totalclock,60.0);
|
||||
totalclock = (totalclock - seconds) / 60.0;
|
||||
int minutes = fmod(totalclock,60.0);
|
||||
int hours = (totalclock - minutes) / 60.0;
|
||||
sprintf(outtime,"Total wall time: "
|
||||
"%d:%02d:%02d\n", hours, minutes, seconds);
|
||||
if (screen) fputs(outtime,screen);
|
||||
if (logfile) fputs(outtime,logfile);
|
||||
utils::logmesg(this,fmt::format("Total wall time: {}:{:02d}:{:02d}\n",
|
||||
hours, minutes, seconds));
|
||||
}
|
||||
|
||||
if (universe->nworlds == 1) {
|
||||
|
||||
Reference in New Issue
Block a user