MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nanoseconds

Function nanoseconds

freebsd/kern/subr_lock.c:283–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281
282#ifndef USE_CPU_NANOSECONDS
283uint64_t
284nanoseconds(void)
285{
286 struct bintime bt;
287 uint64_t ns;
288
289 binuptime(&bt);
290 /* From bintime2timespec */
291 ns = bt.sec * (uint64_t)1000000000;
292 ns += ((uint64_t)1000000000 * (uint32_t)(bt.frac >> 32)) >> 32;
293 return (ns);
294}
295#endif
296
297static void

Calls 1

binuptimeFunction · 0.85

Tested by

no test coverage detected