Hey, I have the same problem as you. One way I know to control is to do something productive in your time like practicing skills, reading a book, chatting etc. Avoid doing nothing for a long while because that's usually the time when you become horny and have the urge to watch porn or do something I don't want to know.
Lastly, avoid triggers, these are hunky guys who look like they are going to strip, naked girls or semi-naked girls who look like they are also going to strip, erotic texts, erotic sounds. If you can't help it, try sleeping instead.