mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix date for long simulation times
This commit is contained in:
@@ -114,7 +114,9 @@ namespace Opm
|
||||
|
||||
boost::posix_time::ptime SimulatorTimer::currentDateTime() const
|
||||
{
|
||||
return startDateTime() + boost::posix_time::seconds( (int) simulationTimeElapsed());
|
||||
// boost uses only 32 bit long for seconds. But 64 bit for milliseconds
|
||||
// as a work around for very large timess we just use milliseconds
|
||||
return startDateTime() + boost::posix_time::milliseconds( simulationTimeElapsed() / Opm::prefix::milli);
|
||||
}
|
||||
|
||||
/// Total time.
|
||||
|
||||
Reference in New Issue
Block a user