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

Function timespec_diff_us

test/bthread_timer_thread_unittest.cpp:27–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace {
26
27long timespec_diff_us(const timespec& ts1, const timespec& ts2) {
28 return (ts1.tv_sec - ts2.tv_sec) * 1000000L +
29 (ts1.tv_nsec - ts2.tv_nsec) / 1000;
30}
31
32// A simple class, could keep track of the time when it is invoked.
33class TimeKeeper {

Callers 1

expect_first_runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected