Use volatile for curr_ticks