tune max_cycle_ms, also make unsigned