I usually think about difficult problems for 5- 10 minutes. If I don't come up with them during this time, I'll put them aside and do other topics. If you work on a difficult problem for too long, it's hard to concentrate. If I change the time, sometimes I will keep thinking.
I hope it helps you.