pass time to on_tick