Implement get_ticks and set_timer.