Add flush method to timer_work