MCPcopy Create free account
hub / github.com/Tencent/libco / diff_ms

Function diff_ms

co_hook_sys_call.cpp:172–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170#define HOOK_SYS_FUNC(name) if( !g_sys_##name##_func ) { g_sys_##name##_func = (name##_pfn_t)dlsym(RTLD_NEXT,#name); }
171
172static inline ll64_t diff_ms(struct timeval &begin,struct timeval &end)
173{
174 ll64_t u = (end.tv_sec - begin.tv_sec) ;
175 u *= 1000 * 10;
176 u += ( end.tv_usec - begin.tv_usec ) / ( 100 );
177 return u;
178}
179
180
181

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected