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

Function rte_cyclecounter_cycles_to_ns

dpdk/lib/eal/include/rte_time.h:39–50  ·  view source on GitHub ↗

* Converts cyclecounter cycles to nanoseconds. */

Source from the content-addressed store, hash-verified

37 * Converts cyclecounter cycles to nanoseconds.
38 */
39static inline uint64_t
40rte_cyclecounter_cycles_to_ns(struct rte_timecounter *tc, uint64_t cycles)
41{
42 uint64_t ns;
43
44 /* Add fractional nanoseconds. */
45 ns = cycles + tc->nsec_frac;
46 tc->nsec_frac = ns & tc->nsec_mask;
47
48 /* Shift to get only nanoseconds. */
49 return ns >> tc->cc_shift;
50}
51
52/**
53 * Update the internal nanosecond count in the structure.

Callers 1

rte_timecounter_updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected