#include "hwtimer.h" void __real__tx_timer_interrupt(void); void __wrap__tx_timer_interrupt(void) { static uint32_t sequence = 1; /* Vary the interval over 17 ACLINT counts, centred on the normal tick, so the ISR samples more than two phases of the test thread's loop. */ sequence = sequence * 1664525u + 1013904223u; uint64_t next = get_aclint_mtimecmp(aclint); set_aclint_mtimecmp(aclint, next - 8 + (sequence >> 16) % 17u); __real__tx_timer_interrupt(); }