| 222 | pthread_t tid() const { return _tid; } |
| 223 | |
| 224 | int64_t current_task_cpu_clock_ns() { |
| 225 | if (_last_cpu_clock_ns == 0) { |
| 226 | return 0; |
| 227 | } |
| 228 | int64_t total_ns = _cur_meta->stat.cpu_usage_ns; |
| 229 | total_ns += butil::cputhread_time_ns() - _last_cpu_clock_ns; |
| 230 | return total_ns; |
| 231 | } |
| 232 | |
| 233 | private: |
| 234 | friend class TaskControl; |
no test coverage detected