| 36 | } |
| 37 | template<class Clock, class Duration> |
| 38 | std::cv_status wait_until( |
| 39 | std::unique_lock<mutex_debug>& lock, |
| 40 | const std::chrono::time_point<Clock, Duration>& when) { |
| 41 | if constexpr (Clock::is_steady) { |
| 42 | // convert from mono_clock to real_clock |
| 43 | auto real_when = ceph::real_clock::now(); |
| 44 | const auto delta = when - Clock::now(); |
| 45 | real_when += std::chrono::ceil<typename Clock::duration>(delta); |
| 46 | timespec ts = ceph::real_clock::to_timespec(real_when); |
| 47 | return _wait_until(lock.mutex(), &ts); |
| 48 | } else { |
| 49 | timespec ts = Clock::to_timespec(when); |
| 50 | return _wait_until(lock.mutex(), &ts); |
| 51 | } |
| 52 | } |
| 53 | template<class Rep, class Period> |
| 54 | std::cv_status wait_for( |
| 55 | std::unique_lock<mutex_debug>& lock, |
no test coverage detected