| 299 | |
| 300 | template <class Clock, class Duration> |
| 301 | bool try_lock_until( |
| 302 | const std::chrono::time_point<Clock,Duration>& timeout_time ) { |
| 303 | _timer.start(); |
| 304 | const bool rc = _lock.try_lock_until(timeout_time); |
| 305 | _timer.stop(); |
| 306 | if (!rc) { |
| 307 | // Out of the criticle section. Otherwise the time will be recorded |
| 308 | // in unlock |
| 309 | *_mutex << _timer.u_elapsed(); |
| 310 | } |
| 311 | return rc; |
| 312 | } |
| 313 | #endif |
| 314 | |
| 315 | private: |