Define timer

I found I needed to define the timer before this widget would work.