-
Daniel Black authored
A 64bit counter can overflow within the time of a query so lets take it that the measurement is the small value rather than an order 1e12 millisecond query. tested with: int main() { ulonglong start = ULONGLONG_MAX - 30; ulonglong end = 600; ulonglong cycles = 10000; cycles += end - start; if (unlikely(end < start)) cycles += ULONGLONG_MAX; printf("cycles %llu\n", cycles); }
0b8144a4