Merge "NNAPI VTS: use max time point instead of uint64_t max"

This commit is contained in:
Slava Shklyaev 2020-02-25 15:36:51 +00:00 committed by Gerrit Code Review
commit 775fe5c617

View file

@ -67,8 +67,10 @@ static OptionalTimePoint makeOptionalTimePoint(DeadlineBoundType deadlineBoundTy
deadline.nanosecondsSinceEpoch(nanosecondsSinceEpoch); deadline.nanosecondsSinceEpoch(nanosecondsSinceEpoch);
} break; } break;
case DeadlineBoundType::UNLIMITED: { case DeadlineBoundType::UNLIMITED: {
uint64_t unlimited = std::numeric_limits<uint64_t>::max(); const auto maxTime = std::chrono::time_point<std::chrono::steady_clock,
deadline.nanosecondsSinceEpoch(unlimited); std::chrono::nanoseconds>::max();
const uint64_t nanosecondsSinceEpoch = maxTime.time_since_epoch().count();
deadline.nanosecondsSinceEpoch(nanosecondsSinceEpoch);
} break; } break;
} }
return deadline; return deadline;