mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5856 Well Disks: Convert to time_t once instead of N times
This commit is contained in:
parent
accfa47539
commit
fbd8fffcca
@ -184,10 +184,12 @@ double RimSimWellInViewTools::extractValueForTimeStep( RifSummaryReaderInterface
|
||||
// Find the data point which best matches the selected time step
|
||||
std::vector<time_t> resampledTimeSteps = resampler.resampledTimeSteps();
|
||||
std::vector<double> resampledValues = resampler.resampledValues();
|
||||
|
||||
time_t currentTime_t = currentDate.toTime_t();
|
||||
|
||||
for ( unsigned int i = 0; i < resampledTimeSteps.size(); i++ )
|
||||
{
|
||||
QDateTime t = QDateTime::fromTime_t( resampledTimeSteps[i] );
|
||||
if ( t > currentDate )
|
||||
if ( resampledTimeSteps[i] > currentTime_t )
|
||||
{
|
||||
*isOk = true;
|
||||
return resampledValues[i];
|
||||
|
Loading…
Reference in New Issue
Block a user