MCPcopy Create free account
hub / github.com/ceph/ceph / wait_until

Method wait_until

src/common/condition_variable_debug.h:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers 8

run_reqMethod · 0.80
run_sched_aheadMethod · 0.80
runMethod · 0.80
_processMethod · 0.80
_runMethod · 0.80
timer_threadMethod · 0.80
timer_threadMethod · 0.80
authenticateMethod · 0.80

Calls 2

nowFunction · 0.50
mutexMethod · 0.45

Tested by

no test coverage detected