int might be suboptimal for ticks_per_us as well as the return value - compare below.