Repeat loop with a delay time condition

I think you need to declare your variable at the beginning of the action block.