/* Copyright (c) 2015, Linaro Limited * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include #include uint64_t odp_cpu_cycles_diff(uint64_t c2, uint64_t c1) { if (odp_likely(c2 >= c1)) return c2 - c1; return c2 + (odp_cpu_cycles_max() - c1) + 1; }