time precision corrected

This commit is contained in:
hamidrezanorouzi 2022-09-11 14:12:09 +04:30
parent 6152ec6a7c
commit febe2ecc4c
3 changed files with 9 additions and 4 deletions

View File

@ -54,7 +54,7 @@ bool pFlow::Time::write
{ {
if(outputToFile()) if(outputToFile())
{ {
Report(0)<<"\nWriting to file at time: "<< cyanText(currentTime())<<endReport; Report(0)<<"\nWriting to file at time: "<< cyanText(currentTimeWord())<<endReport;
return repository::write(verbose); return repository::write(verbose);
} }
return true; return true;

View File

@ -59,8 +59,7 @@ public:
//// - Methods //// - Methods
virtual fileSystem localPath()const virtual fileSystem localPath()const
{ {
real ct = currentTime(); word lp = currentTimeWord();
word lp = real2Word( ct, timePrecision());
return lp; return lp;
} }

View File

@ -103,6 +103,12 @@ public:
return currentTime_; return currentTime_;
} }
word currentTimeWord() const
{
word ctw = real2Word( currentTime(), timePrecision());
return ctw;
}
int32 currentIter()const int32 currentIter()const
{ {
return currentIter_; return currentIter_;
@ -132,7 +138,7 @@ public:
currentTime_ += dt_; currentTime_ += dt_;
if(screenReport()) if(screenReport())
{ {
Report(0)<<"Time (s): "<<cyanText(currentTime_)<<endReport; Report(0)<<"Time (s): "<<cyanText( currentTimeWord() )<<endReport;
} }
// switch outputToFile_ on/off // switch outputToFile_ on/off
checkForOutputToFile(); checkForOutputToFile();