I think there's something to be said for breaking perseveration. I frequently find myself repeating the same wrong solution to a problem, then breaking for the day and solving it in 5 minutes when I start the next day. I don't think a timer is necessarily helpful. Rubber Ducking, pair programming or the venerated technique of asking for help work pretty well too.