common: Move wait_ticks functions out of common.h