MCPcopy Create free account
hub / github.com/apache/brpc / bthread_cpu_clock_ns

Function bthread_cpu_clock_ns

src/bthread/bthread.cpp:647–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645}
646
647uint64_t bthread_cpu_clock_ns(void) {
648 bthread::TaskGroup* g = bthread::tls_task_group;
649 if (g != NULL && !g->is_current_main_task()) {
650 return g->current_task_cpu_clock_ns();
651 }
652 return 0;
653}
654
655int bthread_set_span_funcs(bthread_create_span_fn create_fn,
656 bthread_destroy_span_fn destroy_fn,

Callers

nothing calls this directly

Calls 2

is_current_main_taskMethod · 0.80

Tested by

no test coverage detected