| 104 | } |
| 105 | |
| 106 | Awaitable<int> sleep_func() { |
| 107 | Trace t("sleep_func"); |
| 108 | int64_t s = butil::monotonic_time_us(); |
| 109 | auto aw = Coroutine::usleep(1000); |
| 110 | usleep(delay_us); |
| 111 | co_await aw; |
| 112 | int cost = butil::monotonic_time_us() - s; |
| 113 | EXPECT_GE(cost, 1000); |
| 114 | LOG(INFO) << "after usleep:" << cost; |
| 115 | co_return 123; |
| 116 | } |
| 117 | |
| 118 | Awaitable<float> exception_func() { |
| 119 | Trace t("exception_func"); |
no test coverage detected