]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/seastar/tests/unit/stall_detector_test.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / seastar / tests / unit / stall_detector_test.cc
index a184ffb37bde7546175452947edeb37881e6acf2..f9e4ba7a0003b40b58830440ddaf4ec2dbb76729 100644 (file)
 
 #include <seastar/core/reactor.hh>
 #include <seastar/core/thread_cputime_clock.hh>
+#include <seastar/core/loop.hh>
+#include <seastar/util/later.hh>
 #include <seastar/testing/test_case.hh>
 #include <seastar/testing/thread_test_case.hh>
+#include <../../src/core/stall_detector.hh>
 #include <atomic>
 #include <chrono>
 
@@ -46,8 +49,8 @@ public:
 };
 
 void spin(std::chrono::duration<double> how_much) {
-    auto end = thread_cputime_clock::now() + how_much;
-    while (thread_cputime_clock::now() < end) {
+    auto end = internal::cpu_stall_detector::clock_type::now() + how_much;
+    while (internal::cpu_stall_detector::clock_type::now() < end) {
         // spin!
     }
 }