Cannot use variable of double in TimerAction intialisation